Unify configs, enhance SSL security
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user