default.conf:
server {
listen 80;
server_tokens off;
location / {
return 301 https://$host$request_uri;
}
}
domain.conf:
server {
listen 443 ssl;
server_name domain.com;
server_tokens off;
*ssl settings*
location /modules/ {
proxy_pass https://modules/;
proxy_redirect off;
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 $host;
}
location / {
proxy_pass https://platform:3000;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
}