How to proxy Jetty through Apache on port 80
In your Apache configuration, a virtual host section could look something like:
<VirtualHost *>
# ...
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /geoserver http://localhost:8080/geoserver
ProxyPassReverse /geoserver http:/localhost:8080/geoserver
# ...
</VirtualHost>
Note that GeoServer will still create links that go through port 8080. The above configuration is useful for cases that don't use the UI - WFS and WMS requests for example.
Although some Apache configurations include mod_proxy by default, it may be necessary to also manually enable mod_proxy_http. Unfortunately, the error 403 Forbidden might be caused by either a misconfigured proxy or the missing http proxy module.
- For Apache2, mod_proxy_http.so has to be in a directory such as /usr/lib/apache2/modules/
- Enable the modules: * On some systems, this is defined in the Apache mods-enabled directory (ie, /etc/apache2/mods-enabled ).
- The file proxy.load may need to include the following:
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so
Comments ( Hide )
|
|
Milo van der Linden says:Apr 23, 2008 16:21 ( Permalink ) |
For the instruction above to run correctly on a Debian server, you have to load the mod_proxy submodule mod_proxy_http. This can be done as follows:
- Make sure mod_proxy_http.so is present in the directory /usr/lib/apache2/modules/
- Go to the apache install directory and enter the directory mods-enabled
- Us vi or nano to alter the file proxy.load. Make sure it holds at least the following lines:LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so- Restart Apache
Good luck!