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

Posted by mattalexx on Pro Webmasters See other posts from Pro Webmasters or by mattalexx
Published on 2011-01-31T06:43:56Z Indexed on 2011/01/31 7:33 UTC
Read the original article Hit count: 415

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.

© Pro Webmasters or respective owner

Related posts about apache

Related posts about apache2