feat(nginx): host conf file
This commit is contained in:
parent
e5ef7b7004
commit
0136998304
1 changed files with 41 additions and 0 deletions
41
docker/nginx-host.conf
Normal file
41
docker/nginx-host.conf
Normal file
|
@ -0,0 +1,41 @@
|
|||
server {
|
||||
listen 80;
|
||||
add_header Content-Security-Policy "upgrade-insecure-requests;";
|
||||
|
||||
server_name sintonia.congegni.net;
|
||||
|
||||
client_max_body_size 512M;
|
||||
client_body_timeout 300s;
|
||||
|
||||
if ($host = sintonia.congegni.net) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
return 404; # managed by Certbot
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl; # managed by Certbot
|
||||
server_name sintonia.congegni.net;
|
||||
add_header Content-Security-Policy "upgrade-insecure-requests;";
|
||||
|
||||
client_max_body_size 512M;
|
||||
client_body_timeout 300s;
|
||||
ssl_certificate /etc/letsencrypt/live/sintonia.congegni.net/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/letsencrypt/live/sintonia.congegni.net/privkey.pem; # managed by Certbot
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
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 X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
|
||||
proxy_set_header Access-Control-Allow-Origin *;
|
||||
proxy_set_header Access-Control-Allow-Methods "GET, POST, OPTIONS, DELETE, PUT";
|
||||
proxy_set_header Access-Control-Allow-Headers "Authorization, Content-Type, Accept";
|
||||
|
||||
proxy_pass http://127.0.0.1:9876;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue