cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to revese proxy Thingworx flow to internet using nginx?

SOLVED
Highlighted
Garnet

How to revese proxy Thingworx flow to internet using nginx?

I am try to reverse proxy Thingworx flow to internet using the existing nginx(not the nginx with flow), but failed. Do thingworx flow this?

My nginx config is as below. Thanks for help.

server {
listen 9394;
server_name abc.mydonmain.com;

location /{
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass https://10.56.4.159;
#proxy_redirect https://10.56.4.159/ /;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#include /etc/nginx/conf.d/acl.default;
#allow a specific ip;
#allow 127.0.0.1;
#deny all;
}
}

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to revese proxy Thingworx flow to internet using nginx?

Hello,

 

I don't see "http" root context, and not sure about the purpose of the headers. Do you use "Upgrade" and "Connection" headers for websockets? Does a simplified config work:

 

worker_processes 1;
events {
    worker_connections 1024;
}
http {
	server {
		listen 9394;
		server_name abc.mydonmain.com;
		location / {
			proxy_pass https://10.56.4.159;
			proxy_http_version 1.1;
		}
	}
}

 

Also, do you reverse-proxy an HTTPS as HTTP? That doesn't look right, does it...

 

/ Constantine

View solution in original post

1 REPLY 1
Highlighted

Re: How to revese proxy Thingworx flow to internet using nginx?

Hello,

 

I don't see "http" root context, and not sure about the purpose of the headers. Do you use "Upgrade" and "Connection" headers for websockets? Does a simplified config work:

 

worker_processes 1;
events {
    worker_connections 1024;
}
http {
	server {
		listen 9394;
		server_name abc.mydonmain.com;
		location / {
			proxy_pass https://10.56.4.159;
			proxy_http_version 1.1;
		}
	}
}

 

Also, do you reverse-proxy an HTTPS as HTTP? That doesn't look right, does it...

 

/ Constantine

View solution in original post

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!