Skip to content

Instantly share code, notes, and snippets.

@jcode
Created January 27, 2012 22:12
Show Gist options
  • Save jcode/1691201 to your computer and use it in GitHub Desktop.
Save jcode/1691201 to your computer and use it in GitHub Desktop.
Apache2 VirtualHost
# override /etc/init.d/apache2/sites_enabled/000-default
NameVirtualHost *
# For each virtual host
<VirtualHost *>
ServerName mydomain.com
ServerAlias x.mydomain.com y.mydomain.com *.otherdomain.net
DocumentRoot /var/rails/myapp/current/public
<Directory "/var/rails/myapp/current/public">
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment