Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've installed Ubuntu Server and Apache2.

I want to test my httpd.conf by adding following code:

<Directory />   
     Order allow,deny   
     Deny from all   

+apache restart

It should raise 403 error while entering website, but I can browse my index.html normally.

share|improve this question
up vote 2 down vote accepted

These two lines should deny all IPs:

Order allow,deny
Deny from all

However, this is not the whole story. You need to place them in the right place. In Ubuntu, you need usually to edit the file /etc/apache2/sites-enabled/000-default which contains the defined vhosts.

If you have a different configuration, you can post the complete configuration to get help.

share|improve this answer
It works, thanks – Djent Feb 22 '12 at 12:24

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.