nosmokingbandit / Watcher3

Other
280 stars 60 forks source link

No login if SSL behind reverse proxy #176

Open Kodac opened 6 years ago

Kodac commented 6 years ago

I noticed that if I used SSL behind a reverse proxy, there was no login page, I got the following error in the nginx logs : /var/www/watcher/auth/static/css/style.css" failed (2: No such file or directory)

Solution I just created a directory called "auth" in watcher directory and pasted the whole static folder in it, now everything works perfectly.

EDIT : Movies in the Library don't have the poster showing up, so the problem might be not only restricted to the login page

nosmokingbandit commented 6 years ago

I haven't used nginx in ages. Would you mind posting a copy of the Watcher section of your config? Cherrypy links /static and /auth/static, so something is causing it to resolve the url to the wrong place.

Kodac commented 6 years ago

Sure :

location ~ ^/watcher { proxy_pass https://MYWEBPAGE.COM:9090; proxy_pass_header Set-Cookie; proxy_pass_header P3P; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }

nosmokingbandit commented 6 years ago

I got nginx running and it is working as expected for me. What OS are you using?