Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my server I have two tomcat applications: 'hidden' and 'open'. The hidden application should only be available for the local network The open app should be available for all networks.

The Applications run on Tomcat 7.0.6 and the requests are forewarded from Apache 2.2.17 with mod_proxy_ajp. All this runs on a FreeBSD 8.2 server.

The Apache web server also handles the root website, which is static. There is no virtual host configured (only one host).

I havn't found any example configuration so far, so I just tried to combine two simple configurations:

ProxyRequests Off
ProxyPreserveHost On

<Proxy /hidden>
  Order Deny,Allow
  Deny from all
  Allow from 192.168

<Proxy /open>
  Order Deny,Allow
  Allow from all

ProxyPass /hidden ajp://localhost:8009/hidden/
ProxyPassReverse /hidden ajp://localhost:8009/hidden/

ProxyPass /open ajp://localhost:8009/open/
ProxyPassReverse /open ajp://localhost:8009/open/

With this configuration both applications are accessible from all networks. I already played with the Allow / Deny settings. This one seemed the most logical to me.

Does anybody have an idea what's wrong with my configuration?


share|improve this question
up vote 1 down vote accepted

The <Proxy> directive takes a full URL - since your virtualhost may have more than one of those, the directive is more suited to when you're using it as a full proxy.

Try changing your directives to <Location> blocks, that should apply the permissions in the way you want:

<Location /hidden>
  Order Deny,Allow
  Deny from all
  Allow from 192.168

<Location /open>
  Order Deny,Allow
  Allow from all
share|improve this answer
Perfect, that did the trick! Thank you – oli Mar 25 '11 at 14:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.