HTTP error 405 when using the webinterface through nginx

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Post Reply
Cytor
Posts: 1
Joined: Sat Jan 02, 2010 11:15 pm

HTTP error 405 when using the webinterface through nginx

Post 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.
Attachments
transmissionweb-405.jpg
transmissionweb-405.jpg (31.67 KiB) Viewed 6347 times
mpox
Posts: 1
Joined: Wed May 26, 2010 11:13 pm

Re: HTTP error 405 when using the webinterface through nginx

Post 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/
Post Reply