Simplify letsencrypt

This commit is contained in:
root
2018-03-29 16:13:38 +02:00
parent 3cb8e7ad71
commit d592a40806
18 changed files with 83 additions and 188 deletions

View File

@@ -3,12 +3,11 @@ server {
listen 80;
server_name www.fachschaften.at fachschaften.at;
location /.well-known {
root /srv/pxy/fachschaften;
allow all;
}
location / {
return 301 https://$host$request_uri;
include snippets/letsencrypt.conf;
location = /google07a86d8e121467dc.html {
rewrite ^/(.*) $1;
return 200 "google-site-verification: $uri";
}
}
@@ -19,16 +18,12 @@ server {
ssl_certificate /etc/letsencrypt/live/www.fachschaften.at/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.fachschaften.at/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/www.fachschaften.at/chain.pem;
include snippets/ssl.conf;
location / {
try_files $uri @pxy;
}
location = / {
return 301 https://$host/articles;
}
location @pxy {
location / {
proxy_pass http://fachschaften.local:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;