Unify configs, enhance SSL security

This commit is contained in:
root
2018-03-25 20:23:08 +02:00
parent 83354160ea
commit 69047a611c
18 changed files with 446 additions and 373 deletions

View File

@@ -2,41 +2,35 @@
server {
listen 80;
server_name www.fachschaften.at fachschaften.at;
root /srv/pxy/fachschaften;
# Location .well known is required for certificate renewal
location /.well-known {
root /srv/pxy/fachschaften;
allow all;
}
# Force SSL
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
listen 443 ssl http2;
server_name www.fachschaften.at fachschaften.at;
# include letsencrypt.conf;
ssl_certificate /etc/letsencrypt/live/www.fachschaften.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.fachschaften.at/privkey.pem;
root /srv/pxy/fachschaften;
ssl_trusted_certificate /etc/letsencrypt/live/www.fachschaften.at/chain.pem;
location /.well-known {
allow all;
}
include snippets/ssl.conf;
location / {
try_files $uri @pxy;
}
location = / {
location = / {
return 301 https://$host/articles;
}
location @pxy {
proxy_pass http://fachschaften.local:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
proxy_pass http://fachschaften.local:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}