43 lines
982 B
Nginx Configuration File
43 lines
982 B
Nginx Configuration File
# -*-nginx-*-
|
|
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 {
|
|
allow all;
|
|
}
|
|
# Force SSL
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
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;
|
|
|
|
location /.well-known {
|
|
allow all;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|