mirror of
https://gitlab.silvrtree.co.uk/martind2000/nginx-profiles.git
synced 2025-01-10 21:05:08 +00:00
32 lines
684 B
Plaintext
32 lines
684 B
Plaintext
server {
|
|
listen [::]:80;
|
|
listen 80;
|
|
|
|
# listen on both hosts
|
|
server_name cozy.silvrtree.co.uk;
|
|
|
|
# and redirect to the https host (declared below)
|
|
# avoiding http://www -> https://www -> https:// chain.
|
|
return 301 https://$server_name$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen [::]:443 default ssl;
|
|
listen 443 default ssl;
|
|
|
|
server_name cozy.silvrtree.co.uk;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000";
|
|
include secure/ssl.conf;
|
|
|
|
location / {
|
|
proxy_pass http://localhost:11443;
|
|
proxy_set_header Host $host;
|
|
proxy_redirect off;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-Protocol $scheme;
|
|
}
|
|
|
|
}
|
|
|