36 lines
885 B
Plaintext
36 lines
885 B
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name garage.timothykim.net;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
http2 on;
|
|
server_name garage.timothykim.net;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/garage.timothykim.net/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/garage.timothykim.net/privkey.pem;
|
|
|
|
include /etc/nginx/conf.d/security-headers.inc;
|
|
|
|
set $upstream_garage http://garage-webui:3909;
|
|
|
|
location / {
|
|
proxy_pass $upstream_garage;
|
|
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;
|
|
}
|
|
}
|