Welcome! Log In Create A New Profile

Advanced

Proxy from one DMZ Nginx instance to another Nginx instance inside our FW

Posted by thg 
thg
Proxy from one DMZ Nginx instance to another Nginx instance inside our FW
September 06, 2016 10:18AM
Hi,

I am trying to accomplish the following scenario:

1. Requests from the Internet goes to our Citrix NetScaler frontend - working
2. NetScaler passes on to Nginx in DMZ - working
3. Nginx sends requests to an internal server for mycompany.com/analytics and mycompany.com/xmlp - working
4. If anything besides analytics or xmlp is requested, the analytics page should be shown - working
5. Nginx should send requests to mycompany.com/resources to another Nginx server on the inside that has access to a restricted server to present content - not working (could the return 301 /analytics be creating this misbehaviour?)

The inside Nginx conf looks like this:

server {
listen 80;
server_name localhost;

location / {
root //myrestrictedserver/common/Data/OracleBI;

}

I cannot figure out what the config on the DMZ Nginx should look like? Any help or tips highly appreciated!

I tried this but only received a 404 from my DMZ Nginx:

server {
listen 80;
server_name mycompany.com;
location / {
return 301 /analytics;
}
location /analytics {
proxy_pass http://internalserver:9502;
}
location /xmlp {
proxy_pass http://internalserver:9502;
}
location /resources {
proxy_pass http://restrictedserver;
}
}


Thx in advance.

Cheers
thg
thg
Re: Proxy from one DMZ Nginx instance to another Nginx instance inside our FW
September 06, 2016 10:54AM
Maybe it would have been easier to just ask if it is possible to route from one Nginx instance to another Nginx instance? Sorry about that!

Cheers
thg
Re: Proxy from one DMZ Nginx instance to another Nginx instance inside our FW
September 06, 2016 11:31AM
Always possible, check the logfiles to see what is getting passed and on what exactly nginx is giving the error, Curl is best used here.

---
nginx for Windows http://nginx-win.ecsds.eu/
thg
Re: Proxy from one DMZ Nginx instance to another Nginx instance inside our FW
September 07, 2016 06:39AM
Thx for reaching out @itpp2012
I managed to get this up and running by using the alias instead of root parameter on my Nginx instance on the inside.

Thx and have a great day


Cheers
thg
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 117
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready