Only 192.168.0.3 can request most files, but anyone can request /public/file.html

Posted by mattalexx on Server Fault See other posts from Server Fault or by mattalexx
Published on 2011-01-31T06:43:56Z Indexed on 2011/01/31 15:27 UTC
Read the original article Hit count: 268

Filed under:
|
|

I have the following virtual host on my development server:

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /srv/web/example.com/pub
    <Directory /srv/web/example.com/pub>
       Order Deny,Allow
       Deny from all
       Allow from 192.168.0.3
    </Directory>
</VirtualHost>

The Allow from 192.168.0.3 part is to only allow requests from my workstation machine.

I want to tweak this to allow anyone to request a certain URL:

http://example.com/public/file.html

How do I change this to allow /public/file.html requests to get through from anyone?

Note: /public/file.html doesn't actually exist as a file on the server. I redirect all incoming requests through a single index file using mod_rewrite.

© Server Fault or respective owner

Related posts about apache

Related posts about networking