Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change 
notification.

The following page has been changed by megaspaz:
http://wiki.apache.org/httpd/TomcatReverseProxy

The comment on the change is:
Replaced <proxy *> with a <Location>.

------------------------------------------------------------------------------
  ProxyRequests Off
  ProxyPass /webapps http://localhost:8080
  ProxyPassReverse /webapps http://localhost:8080
+ 
+ <Location "/webapps">
+   # Configurations specific to this location. Add what you need.
+   # For instance, you can add mod_proxy_html directives to fix
+   # links in the HTML code. See link at end of this page about using
+   # mod_proxy_html.
+ 
+   # Allow access to this proxied URL location for everyone.
+   Order allow,deny
+   Allow from all
+ </Location>
  }}}
  
  The directives above secures your Apache server and sets up the reverse proxy 
to the Tomcat server. In this example, the Tomcat server and Apache webserver 
are on the same machine and Tomcat is listening on the default port of 8080.
  
- You can test to see that your proxy is working by accessing 
http://localhost/webapps. You should see the default Tomcat homepage. Note, 
that '''/webapps''' in the '''!ProxyPass''' and '''!ReverseProxyPass''' lines 
can be whatever you want. You can use '''/foo''' if you want and you can access 
Tomcat with http://localhost/foo.
+ You can test to see that your proxy is working by accessing 
http://localhost/webapps. You should see the default Tomcat homepage. Note, 
that '''/webapps''' in the '''!Location''' block, the '''!ProxyPass''' and the 
'''!ReverseProxyPass''' lines can be whatever you want. You can use '''/foo''' 
if you want and you can access Tomcat with http://localhost/foo.
  
+ '''***Note***''' Make sure you understand the 
[http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#access security issues] 
involved with proxies and set up access controls for your proxy configuration.
- '''***Note***''' If you get proxy forbidden errors in your error log, you can 
add a '''<Proxy>''' block and restart Apache to see if this fixes the issue. 
Make sure you understand the 
[http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#access security issues] 
involved with proxies and set up access controls for your proxy configuration.
- 
- 
- {{{# <Proxy> block example. Make sure ProxyRequests Off is set.
- # Since this is a reverse proxy set up, access control is less important.
- # http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#access
- <Proxy *>
-   Order deny,allow
-   Allow from all
- </Proxy>
- }}}
  
  With a default Tomcat setup, you will have broken links in the '''Tomcat 
Manager''' page. Learn how to fix them with 
[:Recipes/TomcatModProxyHTML:mod_proxy_html].
  

Reply via email to