0

I have 2 NIFI instance on differents servers with 1 NGINX reverse proxy in front.

It should go like this:

NGINX Reverse proxy > proxy.lan/nifi1 goes to the NIFI 1 instance on nifi1.lan
NGINX Reverse proxy > proxy.lan/nifi2 goes to the NIFI 2 instance on nifi2.lan

NGINX reverse proxy runs on 192.168.1.114:80 NIFI runs on 192.168.1.153:8080

My configuration file nginx.conf:

server {
listen 80
server_name 192.168.1.114;

location /nifi1 { proxy_set_header X-ProxyScheme "http"; proxy_set_header X-ProxyHost "192.168.1.114"; proxy_set_header X-ProxyPort "80"; proxy_set_header X-ProxyContextPath "/nifi1"; proxy_pass http://192.168.1.153:8080; } }

This is my NIFI nifi.properties file:

nifi.web.proxy.content.path=/nifi1
nifi.web.proxy.host=192.168.1.114:80

When accessing http://192.168.1.114/nifi1, I will get the message "Did you mean /nifi" but the page looks off. It's missing the styling of the page.

I get redirected after 5 secs to http://192.168.1.114/nifi1/nifi and the same message appears "Did you mean /nifi", again, without any styling.

And it just keeps redirecting over and over, retrying http://192.168.1.114/nifi/nifi1.

Either i'm missing a configuration in NGINX and it's not passing what NIFI is looking for, or NIFI can't process my request from NGINX and it's in a redirecting loop.

When going directly to http://192.168.1.153:8080/nifi, I can get the page just fine.

Solved! Thank you to some linux nerd!

server {
listen 80
server_name 192.168.1.114;

location /nifi1/ { proxy_set_header X-ProxyScheme "http"; proxy_set_header X-ProxyHost "192.168.1.114"; proxy_set_header X-ProxyPort "80"; proxy_set_header X-ProxyContextPath "/nifi1"; proxy_pass http://192.168.1.153:8080/; } }

0 Answers0