Skip to content

Instantly share code, notes, and snippets.

@mrdaemon
Last active December 12, 2015 07:18
Show Gist options
  • Save mrdaemon/4735162 to your computer and use it in GitHub Desktop.
Save mrdaemon/4735162 to your computer and use it in GitHub Desktop.
Example of namebased virtualhosts
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.asshole.com
ServerAlias asshole.com sub.asshole.com
DocumentRoot /var/www/asshole
</VirtualHost>
<VirtualHost *:80>
ServerName data.asshole.com
DocumentRoot /var/www/assholedata
</VirtualHost>
192.168.0.2 www.asshole.com sub.asshole.com asshole.com
192.168.0.2 data.asshole.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment