Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI - Can't Login via Nginx Reverse Proxy #11897

Closed
j-remy11 opened this issue Jan 20, 2020 · 4 comments
Closed

WebUI - Can't Login via Nginx Reverse Proxy #11897

j-remy11 opened this issue Jan 20, 2020 · 4 comments
Labels
WebUI WebUI-related issues/changes

Comments

@j-remy11
Copy link

j-remy11 commented Jan 20, 2020

Please provide the following information

qBittorrent version and Operating System

4.2.1 - Linux Mint 19.2

If on linux, libtorrent-rasterbar and Qt version

libtorrent 1.2.3

What is the problem

Can't login via nginx reverse proxy. I can login fine on my local network but if i try to login remotely using a nginx proxy, nothing happens. I can login into all my other applications via nginx. I dont even get an error message saying my login info is incorrect or anything. I'm able to connect via mobile android apps as well just cant via a browser for some reason. It seems like my nginx config might be wrong. I'm using the config it says to use.

location /qbt/ {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $server_name:$server_port;
proxy_hide_header Referer;
proxy_hide_header Origin;
proxy_set_header Referer '';
proxy_set_header Origin '';
# proxy_set_header Host 127.0.0.1:8080; # if you use the "enable host header validation" setting with 127.0.0.1 in the "server domains" text box
# add_header X-Frame-Options "SAMEORIGIN"; # not needed since 4.1.0
}

Any help would be greatly appreciated.

@j-remy11
Copy link
Author

Okay I'm getting somewhere. I'm able to login via Microsoft Edge but not the latest version of chrome or firefox.

@jef
Copy link

jef commented Jan 20, 2020

This is what I'm using for my nginx setup:

location ^~ /qbt/ {
    resolver 127.0.0.1 valid=30s;
    proxy_pass http://127.0.0.1:8080/; # use whatever port you have setup in qBt

    client_max_body_size 10m;
    client_body_buffer_size 128k;

    #Timeout if the real server is dead
    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;

    # Advanced Proxy Config
    send_timeout 5m;
    proxy_read_timeout 240;
    proxy_send_timeout 240;
    proxy_connect_timeout 240;

    proxy_redirect  http://  $scheme://;
    proxy_http_version 1.1;
    proxy_set_header Connection "";
    #proxy_cookie_path / "/; HTTPOnly; Secure"; # enable at your own risk, may break certain apps
    proxy_cache_bypass $cookie_session;
    proxy_no_cache $cookie_session;
    proxy_buffers 32 4k;

    proxy_set_header        X-Forwarded-Host        $server_name:$server_port;
    proxy_hide_header       Referer;
    proxy_hide_header       Origin;
    proxy_set_header        Referer                 '';
    proxy_set_header        Origin                  '';
    add_header              X-Frame-Options         "SAMEORIGIN"; # see note
}

I'd also make sure you're not running into problems with upgrading from 1.x to 2.x in terms of updating the password. Take a look at these issues: #11680 #11571.

Okay I'm getting somewhere. I'm able to login via Microsoft Edge but not the latest version of chrome or firefox.

This also makes me think it's a cookie issue. I'd delete your cookies on the domain you're using just in case even though you have it disabled in your nginx config.

@thalieht thalieht added the WebUI WebUI-related issues/changes label Jan 20, 2020
@Piccirello
Copy link
Member

@j-remy11 Are you still having problems?

@xavier2k6
Copy link
Member

@j-remy11 Are you still having problems?

OP disappeared.....closing

If you experience this issue with qBittorrent 4.3.4.1 or later, please feel free to open a "New Issue"

@qbittorrent qbittorrent locked and limited conversation to collaborators Apr 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
WebUI WebUI-related issues/changes
Projects
None yet
Development

No branches or pull requests

5 participants