| 1 | Running the CryptoBox behind a proxy |
|---|
| 2 | |
|---|
| 3 | This describes how to setup the CryptoBox webserver behind a proxy webserver |
|---|
| 4 | (e.g.: apache or lighttpd). |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | -=-=-=- apache in front of the cryptobox-server (cherrypy) -=-=-=- |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | The following section describes how to configure an apache2 webserver to |
|---|
| 12 | forward requests to the cherrypy server of the CryptoBox. |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | 1) Required modules |
|---|
| 16 | - proxy |
|---|
| 17 | - headers |
|---|
| 18 | Both module should be part of usual default installations of apache2. |
|---|
| 19 | Activate these modules. For debian you should run: a2enmod MOD_NAME |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | 2) Configuration directives |
|---|
| 23 | The following example should help you to create your own proxy configuration |
|---|
| 24 | for apache2. |
|---|
| 25 | |
|---|
| 26 | ProxyRequests Off |
|---|
| 27 | |
|---|
| 28 | <Proxy *> |
|---|
| 29 | Order Deny,Allow |
|---|
| 30 | Allow from all |
|---|
| 31 | </Proxy> |
|---|
| 32 | |
|---|
| 33 | <Location /cryptobox/> |
|---|
| 34 | ProxyPass http://localhost:8080/ |
|---|
| 35 | ProxyPassReverse http://localhost:8080/ |
|---|
| 36 | RequestHeader set CryptoBox-Location /cryptobox |
|---|
| 37 | # uncomment the next line for ssl-enabled virtualhosts |
|---|
| 38 | RequestHeader set X-SSL-Request 1 |
|---|
| 39 | </Location> |
|---|
| 40 | |
|---|
| 41 | Now you should restart apache2. |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | 3) Testing |
|---|
| 45 | Now you should point your webserver to the proxy host and check if |
|---|
| 46 | the CryptoBox layout ist displayed properly. |
|---|
| 47 | |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | -=-=-=- lighttpd in front of the cryptobox-server (cherrypy) -=-=-=- |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | In this section we do the same as above, but with lighttpd. |
|---|
| 54 | |
|---|
| 55 | Your lighttpd config should contain something like this: |
|---|
| 56 | |
|---|
| 57 | # selecting modules |
|---|
| 58 | server.modules = ( "mod_scgi" ) |
|---|
| 59 | |
|---|
| 60 | scgi.server = ( "/cryptobox" => |
|---|
| 61 | (( "host" => "127.0.0.1", |
|---|
| 62 | "port" => 8080, |
|---|
| 63 | "check-local" => "disable" |
|---|
| 64 | )) |
|---|
| 65 | ) |
|---|
| 66 | |
|---|