49 lines
1.2 KiB
Text
49 lines
1.2 KiB
Text
upstream vaultwarden-default {
|
|
zone vaultwarden-default 64k;
|
|
server 192.168.1.209:8000;
|
|
keepalive 2;
|
|
}
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name vault.shad.moe www.vault.shad.moe;
|
|
if ($host = vault.shad.moe) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
return 404;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
|
|
http2 on;
|
|
|
|
server_name vault.shad.moe www.vault.shad.moe;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/vault.shad.moe/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/vault.shad.moe/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
client_max_body_size 525M;
|
|
|
|
include snippets/http-cat-error-pages.conf;
|
|
|
|
location / {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_pass http://vaultwarden-default;
|
|
}
|
|
|
|
location /admin {
|
|
return 403;
|
|
}
|
|
}
|