Skip to content

Instantly share code, notes, and snippets.

@anhtuank7c
Last active March 24, 2016 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anhtuank7c/449e6a1b2199b72237a5 to your computer and use it in GitHub Desktop.
Save anhtuank7c/449e6a1b2199b72237a5 to your computer and use it in GitHub Desktop.
Demo config apache virtual host
<VirtualHost *:80>
ServerAdmin support@your_domain.com
ServerName subdomain.your_domain.com
ServerAlias www.subdomain.your_domain.com
DocumentRoot /var/www/subdomain.your_domain.com
# your folder /var/www/subdomain.your_domain.com
<Directory /var/www/subdomain.your_domain.com>
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php index.html
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
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>
ErrorLog ${APACHE_LOG_DIR}/subdomain.your_domain.error.log
CustomLog ${APACHE_LOG_DIR}/subdomain.your_domain.access.log combined
#RewriteEngine On
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment