hi i have an ec2 instance at amazon which runs on normal 80 port and i have a node running on 3002 port how can i make my node run on port 80 in my amazon ec2 instance along with apache i tried most of online tutorials like reverseproxy mod proxy etc on apache
i need to run my node server on www.mywebsite.com/node now its running on www.mywebsite.com:3002/
i tried to edit my
/etc/httpd/conf/httpd.conf
Of apache like below but had no effect whatsoever
<VirtualHost *:80>
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
ProxyPass /node http://localhost:3002/
ProxyPassReverse /node http://localhost:3002/
</Location>
</VirtualHost>
To configure the Apache server for the Node application, we'll follow these steps: Confirm the Apache server is running. Create the Apache configuration file. Enable the proxy and proxy_http modules.
Connect using a standalone SSH client. Connect using Session Manager. Connect using browser-based SSH connection.
I've not used apache for ages now but I think your location for mod_proxy would look like:
<Location /node >
ProxyPass http://localhost:3002/
</Location>
Also, have you restarted apache?
service httpd restart
should do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With