Skip to content

Instantly share code, notes, and snippets.

@arbo77
Last active August 29, 2015 14:09
Show Gist options
  • Save arbo77/7c37d1df5305338ad38d to your computer and use it in GitHub Desktop.
Save arbo77/7c37d1df5305338ad38d to your computer and use it in GitHub Desktop.
Setting multiple expressjs app menggunakan apache virtual hosting + mod_proxy
127.0.0.1 localhost.io
127.0.0.1 www.localhost.io
127.0.0.1 www1.localhost.io
127.0.0.1 www2.localhost.io
127.0.0.1 nodejs.localhost.io
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.localhost.io
DocumentRoot "E:/www"
</VirtualHost>
<VirtualHost *:80>
ServerName nodejs.localhost.io
ProxyRequests off
ProxyPreserveHost on
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
</VirtualHost>
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment