listen proxy_protocol and rewrite redirect scheme

adrhc nginx-forum at
Sat Sep 17 17:51:19 UTC 2016

Hi, I'm sorry for the babble above but there are so many point of failure
and the setup is so complex. 
Last problem was php (e.g. phpMyAdmin).

Anyway now really works this way:

if (c->ssl || port == 443) { 
*b->last++ ='s'; 

	server {
		listen		proxy_protocol;
		port_in_redirect			on;

stunnel configuration: 
accept =
connect = 
protocol = proxy 
sni = 
[tls to any http]
sni = tls:*
connect =
protocol = proxy

fastcgi_param HTTPS "on";
fastcgi_param SERVER_PORT "443";

Posted at Nginx Forum:,269623,269647#msg-269647

More information about the nginx mailing list