Get transmission web interface working with web server
Solution 1
I was able to get this working just now with the following location in my config:
location /transmission {
proxy_pass http://127.0.0.1:9091;
proxy_pass_header X-Transmission-Session-Id;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
When I went to /transmission/
, I got a 409 error saying that I had an invalid X-Transmission-Session-Id
header, but when I went to /transmission/web
everything seemed to be okay.
Solution 2
There is a working sample in Linuxserver.io repository.
https://github.com/linuxserver/reverse-proxy-confs/blob/master/transmission.subfolder.conf.sample
If you are not using docker, the configuration may look like this.
location ^~ /transmission {
include proxy.conf;
proxy_pass http://127.0.0.1:9091;
proxy_pass_header X-Transmission-Session-Id;
}
location ^~ /transmission/rpc {
include proxy.conf;
proxy_pass http://127.0.0.1:9091;
}
proxy.conf
is in https://github.com/linuxserver/docker-swag/blob/master/root/defaults/proxy.conf
Solution 3
Your config says that only urls which start with /torrents/
should be proxy_passed to http://127.0.0.1:9091
. For any other url like /transmission
nginx will use the first location /
and hence not proxy_pass it to the backend.
If you want every request to be proxy passed to the backend, you would need this location instead of the two you have:
location / {
proxy_pass_header X-Transmission-Session-Id;
proxy_pass http://127.0.0.1:9091;
}
Related videos on Youtube
![Suriya Prakash.T](https://i.stack.imgur.com/V7LZ9.jpg?s=256&g=1)
Comments
-
Suriya Prakash.T almost 2 years
I have my working on default port and I want to be able to use the web interface with an URL like
http://my.domain/torrents
.I tried adding a location and a proxy conf to Nginx but it fail to work fully. I guess it's because of web interface redirections.
server { root /data/www; autoindex on; server_name localhost; location / { try_files $uri $uri/ /index.html; } location /torrents/ { proxy_pass_header X-Transmission-Session-Id; proxy_pass http://127.0.0.1:9091; } }
This conf fail because it can't reach
/transmission/rpc
(404 /usr/share/transmission/web/rpc
) I have tried many things and I always have something missing.transmission/rpc
ortransmission/upload
ortransmission/web
ortransmission/javascript/whatever
... -
Suriya Prakash.T over 11 yearsThanks for your answer, I use nginx as my web server so I don't want to forward all requests to the transmission web interface. Only those coming from /torrents/. But you point out that my basic web configuration may be one part of the problem. I will continu to investigate.
-
pawelkuznik almost 9 yearsI ran into some old problems ;)
-
Sergej Popov over 3 yearsIt's 2020 and still helpful! :P Thanks!