Files
nginx_sites/fachschaften.at/default.conf
2018-03-25 20:23:08 +02:00

37 lines
911 B
Nginx Configuration File

# -*-nginx-*-
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;
}
}
server {
listen 443 ssl http2;
server_name www.fachschaften.at fachschaften.at;
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 {
proxy_pass http://fachschaften.local:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}