I have a express server on my Linode running, how do I add nginx for the static website?
I currently have an express server running on my Linode. I would now like to host a static React website using nginx. I'm a little confused though.
Currently the IP address is mapped to express routes on my API eg. xx.xxx.xxx.xxx/some_route
I setup port forwarding from 3000
express to 8000
the web like so:
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp — dport 80 -j REDIRECT — to-port 3000
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp — dport 443 -j REDIRECT — to-port 8000
How will my website work if the IP address is already being mapped to the express API?
1 Reply
If it's static, consider Linode Object Storage.