You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mark Huth <mh...@coldswim.com> on 2004/12/06 06:15:57 UTC
[users@httpd] Sample Httpd.conf
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 our_internal_domain.com
Allow from our_external_domain.com
Deny from all
</Directory>
But all one had to do was type a subdirectory name from a public server and
voosh....in they were.
I'd think that this should be easy, but even with copies of a couple of
books on Apache I don't seem to be able to access the magic incantations!
Could someone send me a sample snippet of httpd.conf which will allow me to
restrict access?
http://public.xdi.org/=mark.m.huth
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Sample Httpd.conf
Posted by Rich Bowen <rb...@rcbowen.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eimantas Vaičiūnas wrote:
| On Monday 06 December 2004 07:15, Mark Huth 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 our_internal_domain.com Allow
|> from our_external_domain.com Deny from all </Directory>
|
| Since your allow directives go before deny directive you should
| write: Order allow,deny
No, that's actually not correct. What Mark had there was almost
correct, if phrased somewhat confusingly.
Order deny,allow
Deny from all
Allow from 192.168
Allow from our_internal_domain.com
Allow from our_external_domain.com
The only thing incorrect was the syntax for the first Allow directive.
- --
Most great hackers are not so much amazed by their own brilliance, so
much as mystified at everyone else's incompetence. -- Paul Graham
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBtFQEXP03+sx4yJMRAmJlAJ0UQBbBnhB5wwE5AAzLZSAjm0E8bwCggm6D
0K8CtpnC/t4uMmKCC+eC4SY=
=VlaU
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Sample Httpd.conf
Posted by Eimantas Vaičiūnas <ei...@sc.vu.lt>.
On Monday 06 December 2004 07:15, Mark Huth 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 our_internal_domain.com
> Allow from our_external_domain.com
> Deny from all
> </Directory>
Since your allow directives go before deny directive you should write:
Order allow,deny
--
Eimantas Vaičiūnas
VU Skaičiavimo centras
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org