How to Setup a Reverse Proxy with Nginx on Centos 7
Firstly, install nginx on the server.
Edit the nginx config file then.
Edit the file like this:
|
|
If you are not going to use a domain name, a public ip address would also work instead of domain.com
π
Find the location section in the file and replace it with:
And that’s it!
You can also add another app in the same nginx server block, for example, location /app_name { β¦ β¦ }
, which means that the server relays from the route /app_name
, and another port, of course.
Last but not least, donβt forget to check the server’s selinux settings.
Happy networking! π