server {
listen 80;
server_name documentation.example.com documentation;
location / {
return 301 https://documentation.example.com$request_uri;
}
}
server {
listen 443 ssl;
# Optionally offer http2
#listen 443 ssl http2;
server_name documentation.example.com;
access_log /var/log/nginx/documentation.example.com_access.log combined;
error_log /var/log/nginx/documentation.example.com_error.log;
include conf.d/ssl.inc;
location / {
proxy_pass http://localhost:8090/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /synchrony {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8091/synchrony;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Authorization "";
}
} |