httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject [users@httpd] Sample httpd.conf
Date Mon, 06 Dec 2004 21:21:55 GMT
I wrote:
I'm struggling through my first setup of Apache 1.x.  I'm using Debian and
I've a working website up and running.  

However, I'd like to restrict public access to only one directory, while
allowing private access to users only behind our firewalls.

I tried the following in the main directory section of httpd.conf:

# Controls who can get stuff from this server.
    Order deny,allow
    Allow from 192.168.x.x
    Allow from
    Allow from
    Deny from all

Rich Bowen replied (in part):
What Mark had there was almost correct, if phrased somewhat confusingly.

Order deny,allow
Deny from all
Allow from 192.168
Allow from
Allow from

The only thing incorrect was the syntax for the first Allow directive.

However, this still leaves the directory world accessible!  I made the
changes, restarted Apache, and called my sister in Philadelphia (doesn't
everyone have a sister in Philly?)  She isn't part of our internal or
external domains and isn't at 192.168...she shouldn't have access to this
directory, but she does! The directory in question is the standard Debian
default /var/www directory.  

What I'm trying to do is:

Internal Directory (lets say something like /var/www_inside_directory) Allow
two ranges of Ip addresses...those that belong to our organization No public
access into this directory.

External Directory (lets say something like/var/www) Public and private
access allowed into this directory.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message