Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache: how to limit virtual dir to local network

On my Apache 2.x server at home, I have a number of virtual directories. I've set up my router so that I can access Apache from the internet. I need to keep one of those virtual dirs (/private) from being accessed outside my home network LAN. So given /private, how do I configure Apache to only serve requests to /private from 192.168.4.x?

like image 383
user86282 Avatar asked Dec 30 '22 02:12

user86282


1 Answers

<Directory /users/me/private>
    Order deny,allow
    Allow from 192.168.4
    Deny from all
</Directory>
like image 170
chaos Avatar answered Jan 05 '23 16:01

chaos