Created
May 15, 2014 09:40
-
-
Save tsunammis/9f195e5d3e890eca4852 to your computer and use it in GitHub Desktop.
Apache Virtual Host with one domain under apache and a specific path to node.js app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName yourdomain.com | |
DocumentRoot /var/www/yourdomaincom | |
# Path under Apache/PHP | |
# http://yourdomain.com/ -> PHP | |
<Directory /var/www/yourdomaincom> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride None | |
Order allow,deny | |
allow from all | |
</Directory> | |
# Proxy to Node.js App | |
# from http://yourdomain.com/yournodejsapp/ to http://localhost:2368/ | |
<ifmodule mod_proxy.c> | |
ProxyVia On | |
ProxyRequests Off | |
ProxyPass /yournodejsapp/ http://localhost:2368/ | |
ProxyPassReverse /yournodejsapp/ http://localhost:2368/ | |
ProxyPreserveHost on | |
<proxy *> | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</proxy> | |
</ifmodule> | |
ErrorLog /var/log/apache.yourdomaincom.error.log | |
LogLevel warn | |
CustomLog /var/log/apache.yourdomaincom.access.log combined | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment