I currently have a website running under apache on my VPS, but i'm planning to run another website with NodeJS.
Since apache runs on port 80 and NodeJS on port 3000 i was wondering how i could manage that when someone type the domain name domain.com, it binds to the port 3000 ?
Also, is it possible that after the redirect on the browser it shows only http://domain.com and not http://domain.com:3000 ?
Use ProxyPass:
<VirtualHost *:80>
ServerName domain.com
ProxyRequests Off
ProxyPass / http://domain.com:3000/
ProxyPassReverse / http://domain.com:3000/
</VirtualHost>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.