Created
September 2, 2022 03:22
-
-
Save FMCorz/e0fbf018cfe52c0d8633c7a66c093bf4 to your computer and use it in GitHub Desktop.
Restrict access to local network in Apache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
DocumentRoot /var/www/dirforbidden | |
<Directory /var/www/dirforbidden> | |
# Local machine only | |
Require local | |
# Broader local network | |
Require ip 192.168 | |
Require ip 10 | |
</Directory> | |
<Directory /var/www/dirforbidden/dirallowed> | |
Require all granted | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment