TUTORIAL Tutorial NGINX Reverse Proxy

Gizmo

Well-known member
Joined
Jun 8, 2021
Messages
524
Awards
4
Offline

Tutorial NGINX Reverse Proxy​

I saw this and wanted to posted it it's not mine lol
Hi 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.
 

boys89

New member
Joined
Apr 29, 2021
Messages
1
Offline

Tutorial NGINX Reverse Proxy​

I saw this and wanted to posted it it's not mine lol
Hi 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.
*** Hidden text: cannot be quoted. ***
grazie
 

jhonatan15

Well-known member
Joined
Aug 28, 2021
Messages
197
Awards
3
Offline
It is necessary to have a proxy for each vod server or you can configure a proxy server for several servers at the same time, I use http and this is the configuration I use for proxy

server {
listen 25461;
listen 8080;

location / {
proxy_pass http://your ip lb;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Original-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_request_headers on;
proxy_max_temp_file_size 0;
client_max_body_size 10m;
client_body_buffer_size 128k;
client_body_timeout 12;
keepalive_timeout 15;
send_timeout 10;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
}


I would like to configure a proxy for several lbs of you but I have not been able to, I have only achieved it individually
 

Tech1970

New member
Joined
Dec 2, 2021
Messages
5
Offline
You can certinaly protect your main server by using cloudflare. No need for this.

I would not advise using cloudflare on any server that streams are on.
 

giovanny132

New member
Joined
Aug 25, 2021
Messages
11
Awards
1
Offline
Puede proteger de forma segura su servidor principal mediante el uso de cloudflare. No hay necesidad de esto.

No aconsejaría usar cloudflare en ningún servidor en el que se encuentren transmisiones.
tiene cuota de tráfico
 

Shake

Member
Joined
Sep 17, 2021
Messages
28
Awards
1
Offline

Tutorial NGINX Reverse Proxy​

I saw this and wanted to posted it it's not mine lol
Hi 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.
*** Hidden text: cannot be quoted. ***
great thanks ,I don't see any attachments, do you have a .sh file to install a reverse proxy?
 
Last edited:
Top