Last active
February 6, 2017 06:26
-
-
Save kumarldh/ac96a953b5a6dd3c5a65 to your computer and use it in GitHub Desktop.
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> | |
#webmaster's email address | |
ServerAdmin webmaster@localhost | |
ServerName my-virtual-host | |
DocumentRoot /var/www/my-virtual-host/document/root/ | |
<Directory /> | |
Options FollowSymLinks | |
#Comment following to enable oveririding through .htaccess, e.g. mod_rewrite | |
AllowOverride None | |
</Directory> | |
<Directory /var/www/my-virtual-host/document/root/> | |
Options Indexes FollowSymLinks MultiViews | |
#Comment following to enable oveririding through .htaccess, e.g. mod_rewrite | |
AllowOverride None | |
#Order for deny and allowing requests, first for allowing and then for denying | |
# Order allow,deny | |
#serve all requests | |
# allow from all | |
Require all granted #newer versions of apache use this directive | |
</Directory> | |
#where do you want CGI scripts | |
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ | |
<Directory "/usr/lib/cgi-bin"> | |
AllowOverride None | |
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | |
Order allow,deny | |
Allow from all | |
</Directory> | |
#path to error log, ${APACHE_LOG_DIR} is expanded to /var/log/apache | |
ErrorLog ${APACHE_LOG_DIR}/my-virtual-host-error.log | |
# Possible values include: debug, info, notice, warn, error, crit, | |
# alert, emerg. | |
LogLevel warn | |
#path to access log, ${APACHE_LOG_DIR} is expanded to /var/log/apache | |
CustomLog ${APACHE_LOG_DIR}/my-virtual-host-access.log combined | |
#Documentations, can be avoided altogether | |
Alias /doc/ "/usr/share/doc/" | |
<Directory "/usr/share/doc/"> | |
Options Indexes MultiViews FollowSymLinks | |
AllowOverride None | |
Order deny,allow | |
Deny from all | |
Allow from 127.0.0.0/255.0.0.0 ::1/128 | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment