32 lines
848 B
Nginx Configuration File
32 lines
848 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name $BASE_URL;
|
|
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name $BASE_URL;
|
|
|
|
http2 on;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem;
|
|
|
|
location / {
|
|
proxy_pass http://sonarr:8989;
|
|
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_redirect off;
|
|
proxy_http_version 1.1;
|
|
}
|
|
}
|