Created
November 23, 2011 20:54
-
-
Save timcrider/1389882 to your computer and use it in GitHub Desktop.
Apache 'no reboot needed' virtual host configuration for development sites.
This file contains hidden or 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
############################################################################### | |
# | |
# Apache virtual host 'no reboot needed' template. | |
# | |
# This apache virtualhost configuration allows a user to create development | |
# sites on the fly. This will not work out of the box however, you will need | |
# to replace the {variables} in this conf with values explained below. This | |
# can be done with a script, or a simple find and replace in your favorite | |
# editor. | |
# | |
############################################################################### | |
# Examples | |
# | |
# TESTING.dev.mysite.com = /path/to/development/TESTING/html/ | |
# blog.dev.mysite.com = /path/to/development/blog/html/ | |
# simple.dev.mysite.com = /path/to/development/simple/html/ | |
# | |
############################################################################### | |
# Known Issues | |
# | |
# All of the development sites are logged into the same access/error files. | |
# | |
############################################################################### | |
# Variables | |
# | |
# {serverip} - IP apache is bound to, may include port. (ex: 127.0.0.1 or 127.0.0.1:80) | |
# {root} - Path to the development root. (ex: /path/to/home/devsites/) | |
# {logroot} - Path to the development site logs. (ex: /path/to/home/logs/) | |
# {domain} - Domain that will host the development. (ex: devsites.mysite.com) | |
# {adminemail} - Email address of the server admin. (ex: [email protected]) | |
# | |
############################################################################### | |
<VirtualHost {serverip}> | |
DocumentRoot {root}dev/html/ | |
ServerName {domain} | |
ServerAlias *.{domain} | |
AccessFileName .htaccess | |
ServerSignature Off | |
UseCanonicalName Off | |
DirectoryIndex index.php index.html index.htm | |
ErrorLog {logroot}{domain}-error.log | |
CustomLog {logroot}{domain}-access.log combined | |
LogLevel debug | |
ServerAdmin {adminemail} | |
<Directory "{root}"> | |
allow from all | |
Options -Indexes | |
AllowOverride All | |
</Directory> | |
VirtualDocumentRoot {root}%1/html/ | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment