Reputation: 13
I have a VPS using apache on port 80, but want to use node.js for a subdomain, without the port node will be using appear in the address bar.
Upvotes: 1
Views: 1167
Reputation: 154
Yes it is possible
In your apache virtual host file configure with the following:
<VirtualHost *:80>
ServerName subdomain.myapp.com
ProxyRequests off
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
ProxyPreserveHost on
</VirtualHost>
You should have NameVirtualHost *:80
Upvotes: 1