listen proxy_protocol and rewrite redirect scheme

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

I'm sorry for the babble above but the source of errors are too many. 
The previous post the problem was php (e.g. phpMyAdmin).

The final working setup:

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

In order to work nginx needs this config: 
	server {
		listen		proxy_protocol;
		port_in_redirect		on;

[tls to http] 
sni = tls:* 
connect = 
protocol = proxy

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

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

More information about the nginx mailing list