Last active
January 16, 2020 09:28
-
-
Save Hypro999/a653e5a392b72e809ad2bef3bee5da8c to your computer and use it in GitHub Desktop.
A sample virutalhost configuration file in Apache2.
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 127.0.1.2:80> | |
ServerName testme.net | |
ServerAlias www.testme.net | |
DocumentRoot /home/hemanth/Code/PHP/testme.net | |
ErrorLog /home/hemanth/Code/PHP/testme.net/logs/error.log | |
<Directory "/home/hemanth/Code/PHP/testme.net"> | |
Require all granted | |
</Directory> | |
<Directory "/home/hemanth/Code/PHP/testme.net/logs"> | |
Require all denied | |
</Directory> | |
<Directory "/home/hemanth/Code/PHP/testme.net/scripts"> | |
Require all denied | |
</Directory> | |
# Don't let attackers/users know that this folder even exists. | |
RedirectMatch 404 /scripts(/|$) | |
<Directory "/home/hemanth/Code/PHP/testme.net/notes"> | |
Options Indexes | |
Require all granted | |
</Directory> | |
<Directory "/home/hemanth/Code/PHP/testme.net/lib"> | |
Require all denied | |
</Directory> | |
# Don't let attackers/users know that this folder even exists. | |
RedirectMatch 404 /lib(/|$) | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment