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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to revese proxy Thingworx flow to internet using nginx?

zhuwenxi
12-Amethyst

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;
}
}

ACCEPTED SOLUTION

Accepted Solutions

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

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

Announcements


Top Tags