1.1 --- a/docs/Webware/NOTES.txt Fri Sep 28 23:04:23 2007 +0000
1.2 +++ b/docs/Webware/NOTES.txt Fri Sep 28 23:04:43 2007 +0000
1.3 @@ -1,78 +1,10 @@
1.4 -Webware's CGI Adapter
1.5 -=====================
1.6 -
1.7 -Copy the Webware/WebKit/Adapters/WebKit.cgi file to your CGI directory (eg.
1.8 -/home/httpd/cgi-bin) and ensure that the permissions are appropriate for a CGI
1.9 -program.
1.10 -
1.11 -Configuring in Apache
1.12 ----------------------
1.13 -
1.14 -Add a line like this to your Apache configuration file (eg. httpd.conf):
1.15 -
1.16 -ScriptAlias /webkit "/home/httpd/cgi-bin/WebKit.cgi"
1.17 -
1.18 -Configuring in AOLserver
1.19 -------------------------
1.20 -
1.21 -NOTE: AOLserver does not seem to handle "URL encoded" character values
1.22 -NOTE: properly when such values appear in the path before the query string.
1.23 -
1.24 -Ensure the presence of the following lines in your configuration file (eg.
1.25 -config.tcl):
1.26 -
1.27 -ns_section "ns/server/${servername}/module/nscgi"
1.28 -ns_param map "GET /webkit /home/httpd/cgi-bin/WebKit.cgi" ;# CGI script file dir (GET).
1.29 -ns_param map "POST /webkit /home/httpd/cgi-bin/WebKit.cgi" ;# CGI script file dir (POST).
1.30 -ns_param interps CGIinterps
1.31 -
1.32 -ns_section "ns/interps/CGIinterps"
1.33 -ns_param .cgi "/usr/bin/python"
1.34 -
1.35 -See docs/CGI/NOTES.txt for more information on AOLserver and CGI
1.36 -configuration.
1.37 -
1.38 -Patches for CGIAdapter when working with AOLserver
1.39 ---------------------------------------------------
1.40 +Webware Support
1.41 +===============
1.42
1.43 -AOLserver appears to set empty CONTENT_LENGTH environment variable values. A
1.44 -patch for CGIAdapter.py in WebKit can be applied as follows (with a suitable
1.45 -relative path to WebStack from Webware/WebKit):
1.46 -
1.47 -cd Webware/WebKit
1.48 -patch -p0 < ../../WebStack/patches/Webware/WebKit/CGIAdapter.py.diff
1.49 -
1.50 -Authentication/Authorisation in Webware
1.51 -=======================================
1.52 -
1.53 -Since Webware provides some kind of CGI emulation environment, the actual HTTP
1.54 -headers involved with authentication/authorisation are not available to the
1.55 -WebStack transaction. Therefore, WebStack depends on Webware having access to
1.56 -the REMOTE_USER environment variable set by the Web server, and with Apache,
1.57 -this variable is only ever set when Apache itself has performed
1.58 -authentication. Whilst applications can send the "WWW-Authenticate" header to
1.59 -HTTP clients, unless Apache has been instructed to process the resulting
1.60 -username/password information, the REMOTE_USER will apparently remain
1.61 -undefined.
1.62 -
1.63 -Consequently, it is recommended that the following kind of definition is added
1.64 -to httpd.conf (for Apache) in order to give applications access to
1.65 -username/password details:
1.66 -
1.67 -<Location "/webkit/auth">
1.68 - AuthType Basic
1.69 - AuthName "AuthResource"
1.70 - AuthUserFile /usr/local/apache2/conf/users
1.71 - require valid-user
1.72 -</Location>
1.73 -
1.74 -The details of the application's deployment, including the exact pathname of
1.75 -the users file and the appropriate access policy, must obviously be defined
1.76 -according to the actual application concerned.
1.77 -
1.78 -Note that the above example will only apply authentication to either a
1.79 -specific context (for Webware releases beyond 0.8.1) and only to a specific
1.80 -"region" of possible URLs (for Webware 0.8.1 and earlier).
1.81 +Applications can be deployed within Webware's WebKit application server and
1.82 +exposed either directly using the server's HTTP support, or indirectly via a
1.83 +CGI adapter working with another kind of Web server. The WebKit server has a
1.84 +somewhat similar role to that of Apache Tomcat for Java Web applications.
1.85
1.86 For Webware Releases Beyond 0.8.1
1.87 =================================
1.88 @@ -158,3 +90,79 @@
1.89
1.90 The WebStack package must reside on the PYTHONPATH, along with the package
1.91 containing the application itself.
1.92 +
1.93 +Webware's CGI Adapter
1.94 +=====================
1.95 +
1.96 +Copy the Webware/WebKit/Adapters/WebKit.cgi file to your CGI directory (eg.
1.97 +/home/httpd/cgi-bin) and ensure that the permissions are appropriate for a CGI
1.98 +program.
1.99 +
1.100 +Configuring in Apache
1.101 +---------------------
1.102 +
1.103 +Add a line like this to your Apache configuration file (eg. httpd.conf):
1.104 +
1.105 +ScriptAlias /webkit "/home/httpd/cgi-bin/WebKit.cgi"
1.106 +
1.107 +Configuring in AOLserver
1.108 +------------------------
1.109 +
1.110 +NOTE: AOLserver does not seem to handle "URL encoded" character values
1.111 +NOTE: properly when such values appear in the path before the query string.
1.112 +
1.113 +Ensure the presence of the following lines in your configuration file (eg.
1.114 +config.tcl):
1.115 +
1.116 +ns_section "ns/server/${servername}/module/nscgi"
1.117 +ns_param map "GET /webkit /home/httpd/cgi-bin/WebKit.cgi" ;# CGI script file dir (GET).
1.118 +ns_param map "POST /webkit /home/httpd/cgi-bin/WebKit.cgi" ;# CGI script file dir (POST).
1.119 +ns_param interps CGIinterps
1.120 +
1.121 +ns_section "ns/interps/CGIinterps"
1.122 +ns_param .cgi "/usr/bin/python"
1.123 +
1.124 +See docs/CGI/NOTES.txt for more information on AOLserver and CGI
1.125 +configuration.
1.126 +
1.127 +Patches for CGIAdapter when working with AOLserver
1.128 +--------------------------------------------------
1.129 +
1.130 +AOLserver appears to set empty CONTENT_LENGTH environment variable values. A
1.131 +patch for CGIAdapter.py in WebKit can be applied as follows (with a suitable
1.132 +relative path to WebStack from Webware/WebKit):
1.133 +
1.134 +cd Webware/WebKit
1.135 +patch -p0 < ../../WebStack/patches/Webware/WebKit/CGIAdapter.py.diff
1.136 +
1.137 +Authentication/Authorisation in Webware
1.138 +=======================================
1.139 +
1.140 +Since Webware provides some kind of CGI emulation environment, the actual HTTP
1.141 +headers involved with authentication/authorisation are not available to the
1.142 +WebStack transaction. Therefore, WebStack depends on Webware having access to
1.143 +the REMOTE_USER environment variable set by the Web server, and with Apache,
1.144 +this variable is only ever set when Apache itself has performed
1.145 +authentication. Whilst applications can send the "WWW-Authenticate" header to
1.146 +HTTP clients, unless Apache has been instructed to process the resulting
1.147 +username/password information, the REMOTE_USER will apparently remain
1.148 +undefined.
1.149 +
1.150 +Consequently, it is recommended that the following kind of definition is added
1.151 +to httpd.conf (for Apache) in order to give applications access to
1.152 +username/password details:
1.153 +
1.154 +<Location "/webkit/auth">
1.155 + AuthType Basic
1.156 + AuthName "AuthResource"
1.157 + AuthUserFile /usr/local/apache2/conf/users
1.158 + require valid-user
1.159 +</Location>
1.160 +
1.161 +The details of the application's deployment, including the exact pathname of
1.162 +the users file and the appropriate access policy, must obviously be defined
1.163 +according to the actual application concerned.
1.164 +
1.165 +Note that the above example will only apply authentication to either a
1.166 +specific context (for Webware releases beyond 0.8.1) and only to a specific
1.167 +"region" of possible URLs (for Webware 0.8.1 and earlier).