37 lines
761 B
Plaintext
37 lines
761 B
Plaintext
|
server {
|
||
|
listen 443 ssl;
|
||
|
|
||
|
server_name quiz.fasttube.de;
|
||
|
|
||
|
root /root/fs-quiz-tool/web;
|
||
|
|
||
|
index index.html;
|
||
|
|
||
|
location / {
|
||
|
# First attempt to serve request as file
|
||
|
# If no such file, pass to backend
|
||
|
try_files $uri $uri/ =404;
|
||
|
}
|
||
|
|
||
|
location /db {
|
||
|
proxy_pass http://127.0.0.1:12345;
|
||
|
proxy_set_header Host $host;
|
||
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
}
|
||
|
|
||
|
ssl_certificate /usr/local/etc/letsencrypt/live/quiz.fasttube.de/fullchain.pem;
|
||
|
ssl_certificate_key /usr/local/etc/letsencrypt/live/quiz.fasttube.de/privkey.pem;
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
|
||
|
server_name quiz.fasttube.de;
|
||
|
|
||
|
listen 80;
|
||
|
|
||
|
# 308 instead of 301 to prohibit method change on redirect
|
||
|
# (some clients change POST to GET on 301, 308 does not allow that)
|
||
|
return 308 https://$host$request_uri;
|
||
|
|
||
|
}
|