Minor fixes to nginx.

This commit is contained in:
Otho 2024-02-25 22:56:55 -05:00
parent c9748bd58d
commit f6fe844849
Signed by: Otho
GPG Key ID: 16C720CD3BBE21D9
2 changed files with 8 additions and 6 deletions

View File

@ -1,7 +1,11 @@
# I assign interface hostnames in /etc/hosts to keep track
# since this app goes years without maintenance.
::1 localhost localhost6
fe80::deed:feed resolver.stashbox
fe80::db web.stashbox
fe80::feed plex.stashbox scp.stashbox
fe80::beef app.stashbox
127.0.0.1 ip4.stashbox
fe80::beef app.stashbox
127.0.0.1 localhost localhost4
127.0.0.2 ip4.stashbox

View File

@ -6,13 +6,13 @@ events {
http {
upstream plexmediaserver {
server localhost:32400;
# Plex only listens on legacy IP by default.
server localhost4:32400;
keepalive 32;
}
server {
listen plex.stashbox:80;
resolver resolver.stashbox;
server_name plex.*;
gzip on;
gzip_vary on;
@ -21,8 +21,6 @@ http {
gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
gzip_disable "MSIE [1-6]\.";
proxy_set_header Host $host;
proxy_set_header Referer localhost;
proxy_set_header Origin $scheme://localhost:$server_port;
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;