2021-02-15, 16:36
(2021-02-15, 02:05)komplex Wrote:php:
# Plex Reverse Proxy
location /plex/ {
include /nginx/conf/errorV2.conf;
auth_request /auth-4;
proxy_pass http://127.0.0.1:32400/;
add_header X-Frame-Options "SAMEORIGIN";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#Websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 36000s;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}
if ($http_referer ~* /plex/) {
rewrite ^/web/(.*) /plex/web/$1? redirect;
}
location ~ /auth-(.*) {
rewrite ^/auth-(.*) /api/v2/auth?group=$1;
} #Org Auth
Thanks that seems to partially work for me. I had to comment out the following two lines:
Code:
include /nginx/conf/errorV2.conf;
auth_request /auth-4;
errorV2.conf
and when the auth_request /auth-4;
was active opening Plex Web always resulted in the following error from nginx:Code:
*9 CreateFile() "C:\Program Files\nginx\nginx-1.19.6/html/api/v2/auth" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: localhost, request: "GET /plex/ HTTP/1.1", subrequest: "/api/v2/auth", host: "localhost"
auth_request /auth-4;
working?