2006-12-14 01:23:10 +01:00
|
|
|
Running the CryptoBox behind a proxy
|
|
|
|
|
2007-01-22 02:46:34 +01:00
|
|
|
This describes how to setup the CryptoBox webserver behind a proxy webserver
|
|
|
|
(e.g.: apache or lighttpd).
|
|
|
|
|
2006-12-14 01:23:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
-=-=-=- apache in front of the cryptobox-server (cherrypy) -=-=-=-
|
2006-12-13 11:01:58 +01:00
|
|
|
|
2007-01-22 02:46:34 +01:00
|
|
|
|
|
|
|
The following section describes how to configure an apache2 webserver to
|
|
|
|
forward requests to the cherrypy server of the CryptoBox.
|
2006-12-13 11:01:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
1) Required modules
|
|
|
|
- proxy
|
2007-03-21 19:37:12 +01:00
|
|
|
- headers
|
2006-12-13 11:01:58 +01:00
|
|
|
Both module should be part of usual default installations of apache2.
|
|
|
|
Activate these modules. For debian you should run: a2enmod MOD_NAME
|
|
|
|
|
|
|
|
|
|
|
|
2) Configuration directives
|
|
|
|
The following example should help you to create your own proxy configuration
|
|
|
|
for apache2.
|
|
|
|
|
|
|
|
ProxyRequests Off
|
|
|
|
|
|
|
|
<Proxy *>
|
|
|
|
Order Deny,Allow
|
|
|
|
Allow from all
|
|
|
|
</Proxy>
|
|
|
|
|
|
|
|
<Location /cryptobox/>
|
|
|
|
ProxyPass http://localhost:8080/
|
|
|
|
ProxyPassReverse http://localhost:8080/
|
|
|
|
RequestHeader set CryptoBox-Location /cryptobox
|
2006-12-18 14:37:08 +01:00
|
|
|
# uncomment the next line for ssl-enabled virtualhosts
|
|
|
|
RequestHeader set X-SSL-Request 1
|
2006-12-13 11:01:58 +01:00
|
|
|
</Location>
|
2006-12-18 14:37:08 +01:00
|
|
|
|
|
|
|
Now you should restart apache2.
|
2006-12-13 11:01:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
3) Testing
|
|
|
|
Now you should point your webserver to the proxy host and check if
|
2007-01-22 02:46:34 +01:00
|
|
|
the CryptoBox layout ist displayed properly.
|
|
|
|
|
2006-12-13 11:01:58 +01:00
|
|
|
|
2006-12-13 23:04:27 +01:00
|
|
|
|
2006-12-14 01:23:10 +01:00
|
|
|
-=-=-=- lighttpd in front of the cryptobox-server (cherrypy) -=-=-=-
|
2006-12-13 23:04:27 +01:00
|
|
|
|
2007-01-22 02:46:34 +01:00
|
|
|
|
2006-12-13 23:04:27 +01:00
|
|
|
In this section we do the same as above, but with lighttpd.
|
|
|
|
|
|
|
|
Your lighttpd config should contain something like this:
|
|
|
|
|
|
|
|
# selecting modules
|
2006-12-14 01:23:10 +01:00
|
|
|
server.modules = ( "mod_scgi" )
|
2006-12-13 23:04:27 +01:00
|
|
|
|
2006-12-14 01:23:10 +01:00
|
|
|
scgi.server = ( "/cryptobox" =>
|
2006-12-13 23:04:27 +01:00
|
|
|
(( "host" => "127.0.0.1",
|
|
|
|
"port" => 8080,
|
|
|
|
"check-local" => "disable"
|
|
|
|
))
|
|
|
|
)
|
|
|
|
|