Skip to content

Instantly share code, notes, and snippets.

@hellwolf
Created January 23, 2014 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hellwolf/8584504 to your computer and use it in GitHub Desktop.
Save hellwolf/8584504 to your computer and use it in GitHub Desktop.
Apache VirtualHosts and ProxyPass
NameVirtualHost *
# default vhost
<VirtualHost *>
DocumentRoot /
</VirtualHost>
# www.snailattach.com
<VirtualHost *>
ServerName www.example.com
ProxyPreserveHost On
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
</VirtualHost>
# t.snailattach.com
<VirtualHost *>
ServerName t.example.com
ProxyPreserveHost On
ProxyPass / http://localhost:8001/
ProxyPassReverse / http://localhost:8001/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment