Skip to content

Instantly share code, notes, and snippets.

@wozozo
Created March 14, 2011 09:07
Show Gist options
  • Select an option

  • Save wozozo/868918 to your computer and use it in GitHub Desktop.

Select an option

Save wozozo/868918 to your computer and use it in GitHub Desktop.
apache VirtualDocumentRoot
LogFormat "%h^__%v^_%V^_%l^_%u^_%t^_%r^_%>s^%b^_%{Referer}i^%{User-Agent}i" vhost
NameVirtualHost *:80
<Directory *>
Options FollowSymLinks ExecCGI Includes MultiViews
AllowOverride All
AcceptPathInfo On
</Directory>
<VirtualHost *:80>
ServerName localhost
VirtualDocumentRoot /var/www/%0/html
ErrorLog /var/log/apache2/error-common.log
CustomLog /var/log/apache2/access-common.log vhost
SetEnv APPLICATION_ENV staging
</VirtualHost>
# <VirtualHost *:80>
# ServerName example.com
# ServerAlias www.example.com
# DocumentRoot /var/www/example.com/html
# ErrorLog /var/log/apache2/error-example.com.log
# CustomLog /var/log/apache2/access-example.com.log vhost
# </VirtualHost>
@avxkim
Copy link

avxkim commented Mar 18, 2018

But www won't work with your config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment