Skip to content

Instantly share code, notes, and snippets.

@cballou
Created August 15, 2011 13:38
Show Gist options
  • Save cballou/1146766 to your computer and use it in GitHub Desktop.
Save cballou/1146766 to your computer and use it in GitHub Desktop.
Wordpress Apache VirtualHost Entry for Multi-Environment Setups
###########################
# provided by skookum.com #
###########################
# A VirtualHost entry open to Port 80
<VirtualHost *:80>
# The email address of your server admin
ServerAdmin corey@skookum.com
# The path to your Wordpress base installation directory
DocumentRoot /var/www/vhosts/skookum.com/html
# The subdomain pointing to your server environment
# It is common to use "local.server.com", "dev.server.com",
# "staging.server.com", and "server.com" depending on your environment
ServerName local.server.com
# Absolute file paths to logging files on your machine
# If you have multiple environments on the same server, make sure
# to use separate filenames
ErrorLog /var/log/httpd/server-local-error_log
CustomLog /var/log/httpd/server-local-access_log common
<Directory />
# This is where you set your environment to one of:
# "local", "dev", "staging", or "production"
SetEnv ENVIRONMENT local
# Used for mod_rewrite for pretty permalinks in Wordpress
RewriteEngine On
Options FollowSymLinks Indexes
AllowOverride AuthConfig Options FileInfo
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment