Hellowlol / HTPC-Manager

A fully responsive interface to manage all your favorite software on your Htpc.
MIT License
344 stars 48 forks source link

Reverse proxy log with localhost #539

Open znooopy opened 7 years ago

znooopy commented 7 years ago

Hi,

Sorry, I don't know if I have to open this new issue to speak about the old issue who is closed (https://github.com/Hellowlol/HTPC-Manager/issues/535).

I have installed a virtual machine in other environment.

HTPC Manager, is running. I set login/password for login.

From outside, I go on my reverse nginx who is reverse proxy to HTPC (127.0.0.1:8085). I try a bad authentification, output log is: "2017-02-26 02:19:58 :: authentication :: WARNING :: Failed login attempt with username: Ddf password: from IP: 127.0.0.1"

Now I active in settings "Use rev proxy headers", save and restart from interface. I try a bad authentification, and it's works: "2017-02-26 02:23:20 :: authentication :: WARNING :: Failed login attempt with username: R password: from IP: 85.12.68.57"

I try again few second ago, but it does no work at all! I'm reverse to "http://127.0.0.1:8085/auth/login".

I precise, when "Use rev proxy headers" isn't active, url is "http://mydomain/auth/login.

I don't understand why this is work few seconds...

Testing conf:

nginx: /etc/nginx/conf.d/proxy.conf: proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

/etc/nginx/sites-enabled/default: server { listen 80 default_server; listen [::]:80 default_server;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;

server_name _;

location / {

proxy_pass http://127.0.0.1:8085;