Skip to content

Instantly share code, notes, and snippets.

@nguyenlocduy
Created January 13, 2011 19:01
Show Gist options
  • Save nguyenlocduy/778399 to your computer and use it in GitHub Desktop.
Save nguyenlocduy/778399 to your computer and use it in GitHub Desktop.
A template for Debian/Ubuntu Apache Virtual Host Conf
<VirtualHost *:80>
# don't loose time with IP address lookups
HostnameLookups Off
# configures the footer on server-generated documents
ServerSignature On
# the email adress of the administrator
ServerAdmin info@domain.tld
# Servername and aliases
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
# DocumentRoot, where the www root is located
DocumentRoot /home/domain.tld/public_html
# basic directory permissions
<Directory /home/domain.tld/public_html>
Options +Indexes +FollowSymLinks +IncludesNOEXEC
#AllowOverride AuthConfig FileInfo Limit
AllowOverride All
# open for everybody
Order allow,deny
Allow from all
</Directory>
# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
# default index file order
DirectoryIndex index.php index.htm index.html
# logging
CustomLog /home/domain.tld/apache_logs/access.log combined
ErrorLog /home/domain.tld/apache_logs/error.log
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment