Page 1 of 1

HTTP error 405 when using the webinterface through nginx

Posted: Sat Jan 02, 2010 11:29 pm
by Cytor
Hi,

I just set up Transmission 1.76 (9395) on my Linksys nslu2 and it's working like a charm. Now, I want to add authentication and (later) HTTPS access by using nginx as a frontend.

So far, I am able to access the webinterface via nginx, but I get a "Connection Failed" just after that (see attached screenshot). I tried playing around a bit with the nginx settings, but so far, I have had no success.

Here's the important part of my nginx.conf:

Code: Select all

location / {
            proxy_set_header    X-Real-IP  $remote_addr;
            proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header    Host $http_host;
            proxy_pass   http://127.0.0.1:9091/transmission/web/;
            proxy_redirect off;
            auth_basic "restricted area";
            auth_basic_user_file /opt/share/transmission/users;
        }
Based on some snippets I found here and on the web.

The only modifications to the settings.json so far is whitelisting my LAN ip range, for testing purposes (localhost whitelisted as well). Maybe I have to make some modifications there as well?
There must be some of you using transmission with nginx out there ;)

Thanks for reading,
Pascal.

Re: HTTP error 405 when using the webinterface through nginx

Posted: Thu May 27, 2010 12:49 am
by mpox
Adding the following to my /etc/nginx/sites-available/default works for me

Code: Select all

	location /transmission {
  	    proxy_set_header    X-Real-IP  $remote_addr;
            proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header    Host $http_host;
            proxy_pass   	http://127.0.0.1:9091/transmission;
            proxy_redirect 	false;

            #auth_basic "restricted area";
            #auth_basic_user_file /opt/share/transmission/users;
	}
Reload nginx and go to http://your.nginx.server/transmission/web/