Tutorial NGINX Reverse Proxy
I saw this and wanted to posted it it's not mine lolHi Guys,
I've seen this subject come up a lot recently so hopefully this can help someone out.
I have been playing around trying to get an nginx reverse proxy setup and after some initial frustrations I have got there in the end.
The idea is to setup a server that sits in front of your main and load balancer servers. Clients will contact the reverse proxy server which in turn communicates with your main and then passes the response back to the client so that your main server ip or DNS is not exposed to the client, only the reverse proxy server is.
It's pretty quick to setup, the steps I took can see below:
Server 1: Setup Xtream UI MAIN / Admin
Server 2: Setup an Xtream UI LB Server
Server 3: Setup another server and install nginx onto it. Edit the nginx config file with proxy pass set to ip address of Server 1 (Main)
Server 1: Update nginx config on MAIN server to include an etnry stating to set_real_ip_from Server 3 ip / dns address.
APK: Edit DNS within the smali of apk pointing it to your NGINX server rather than your MAIN server.