Super User is a question and answer site for computer enthusiasts and power users. 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

I am using apache http server 2.4.4 for load balancing purpose along with tomcat 7.0.

I have hosted 2 applications under my tomcat for e.g. app1 and app2.

What I want to achieve is for app1 I want to allow only certain ips from intranet to have access on it.

I added following code to my httpd.conf file.

DocumentRoot "C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\scm"
<Directory "C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\app1">
    Order Deny,Allow
    Deny from some_ip

Still I am not able to restrict the access. I have enabled the module mod_authz_host. Kindly guide me.

share|improve this question


Order deny,allow
Deny from all
Allow from some_ip

to just allow some_ip access to the service.

However Order, Deny and Allow are now deprecated and you might want to try

Require host <host_name>


Require ip <ip_address>


share|improve this answer

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.