2017-04-07 23:33:24 +02:00
|
|
|
location / {
|
|
|
|
if ($scheme = http) {
|
|
|
|
rewrite ^ https://$server_name$request_uri? permanent;
|
|
|
|
}
|
2017-04-19 23:17:08 +02:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_set_header X-NginX-Proxy true;
|
|
|
|
|
2017-04-20 11:44:44 +02:00
|
|
|
proxy_pass http://__URL__:__PORT__;
|
2017-04-19 23:17:08 +02:00
|
|
|
proxy_redirect off;
|
2017-04-07 23:33:24 +02:00
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_buffering off;
|
|
|
|
|
2017-04-19 23:17:08 +02:00
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
2017-04-07 23:33:24 +02:00
|
|
|
}
|