apache2 - What is the simplest apache mod_proxy configuration for Glassfish? -


I have a server with Apache2 (on port 80) and glassfish (port 8080). I want to configure Apache to a transparent proxy al request for a fixed virtual host on the Glassfish server.
I tried to do this, but it does not work:

  & lt; VirtualHost * & gt; Server name tognettiimmobiliare.com ServerAlias ​​www.tognettiimmobiliare.com Proxy & lt; Proxy * & gt; Requests on, reject order, allow all & lt; / Proxy & gt; ProxyPoint at ProxyPreserveHost / http://tognettiimmobiliare.com:8080/tognettiWEB/ ProxySpaceRevers / http://tognettiimmobiliare.com:8080/tognettiWEB/ & lt; / VirtualHost & gt;   

Can anyone tell me why? Thanks, I'm proxying Jenkins and Redmin from a different port with mod_proxy, my configuration looks like something, without an extra & lt; Proxy & gt; The part is not required:

  LoadModule proxy_module module / mod_proxy.so LoadModule proxy_http_module module / mod_proxy_http.so ProxyPass / jenkins / Http: // localhost: 8080 / jenkins / ProxyPassReverse / Jenkins / http: // localhost: 8080 / jenkins / ProxyPass / redmine / http: // localhost: 81 / redmine / ProxyPassReverse / redmine / http: // localhost: 81 / redmin /   

There are two things to keep in mind:

  • The context should be both proxy and proxy in the URL, such as / Jenkins / and ... / Jenkins / < / Li>

  • You will need to remove the external URL for the proxied page. Will try out should not be used because of the Internet and connect from there, it is slow and firewall may block the port. Use local machine name or IP.

Comments