You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ed Curtis <ed...@homes2see.com> on 2003/10/16 16:23:43 UTC

[users@httpd] Access to directories by IP address.

 I'm running Apache 1.3.26 on a Debian system. I would like to lock down
some directories located inside a virtual host directory.

 Say I have www.homer.com and I also have www.homer.com/stuff

 I want to lock access to /stuff to only allow access from certain ip
addresses. I've read the manual on this and did exactly as it says.

 In the virtual host config for www.homer.com I have.

	<Directory /test>
	order deny,allow
	deny from all
	allow from this class c/24
	allow from 10.0.0.0/24
	</Directory>

I restarted the server, made sure mod_access is loaded and can still
access the www.homer.com/test directory from outside the networks outlined
in the above directive.

 Where do I go from here?

Thanks,

Ed



---------------------------------------------------------------------
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] Access to directories by IP address.

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 16 Oct 2003, Ed Curtis wrote:
> You are correct, my mistake. I do have a full system path to the folder.
>
> <Directory /var/www/home/test>
>
> Anything else?

Check for other directives that may apply to the same location and overide
your config.  Also, check the access_log to see exactly what IP address
the server is seeing the incoming requests on.

Joshua.

---------------------------------------------------------------------
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] Access to directories by IP address.

Posted by Ed Curtis <ed...@homes2see.com>.

You are correct, my mistake. I do have a full system path to the folder.

<Directory /var/www/home/test>

Anything else?

Ed


On Thu, 16 Oct 2003, Joshua Slive wrote:

>
> On Thu, 16 Oct 2003, Ed Curtis wrote:
> > 	<Directory /test>
> > 	order deny,allow
> > 	deny from all
> > 	allow from this class c/24
> > 	allow from 10.0.0.0/24
> > 	</Directory>
> >
> > I restarted the server, made sure mod_access is loaded and can still
> > access the www.homer.com/test directory from outside the networks outlined
> > in the above directive.
>
> <Directory> takes a full file-system path, not a web/url-path.  So you
> probably need <Directory /usr/local/apache2/htdocs/test/> or something
> like that.
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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] Access to directories by IP address.

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 16 Oct 2003, Ed Curtis wrote:
> 	<Directory /test>
> 	order deny,allow
> 	deny from all
> 	allow from this class c/24
> 	allow from 10.0.0.0/24
> 	</Directory>
>
> I restarted the server, made sure mod_access is loaded and can still
> access the www.homer.com/test directory from outside the networks outlined
> in the above directive.

<Directory> takes a full file-system path, not a web/url-path.  So you
probably need <Directory /usr/local/apache2/htdocs/test/> or something
like that.

Joshua.

---------------------------------------------------------------------
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