how to redirect Transmission 1.34 to port 80?

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Sino
Posts: 11
Joined: Sat Jun 19, 2010 1:43 pm

Re: how to redirect Transmission 1.34 to port 80?

Postby Sino » Sun Jun 27, 2010 11:17 pm

paf.goncalves ,did you tryed with :

Code: Select all

# Redirect requests to /transmission to /transmission/web
RewriteRule /transmission[/]?$ /transmission/web [R=permanent]

# Forward all requests for /transmission to transmission-daemon
ProxyPass /transmission http://127.0.0.1:9091/transmission
ProxyPassReverse /transmission http://127.0.0.1:9091/transmission


You need the rewrite rule because you would have a 409 error too using xxxx:9091/transmission link instead of xxxx:9091/transmission/web



I have a problem with 2.00 and webui using proxy too.. realy not easy to configure for newbies :lol:

I used the howto https://trac.transmissionbt.com/wiki/WebProxy but without success.

I cannot connect to rpc.

xxx:9091 works fine but xxx/transmission wich redirect to xxx/transmission/web don't connect with rpc.

When I use the rpc pasword without apache password configuration, I can enter the pass then, I got "failed to connect" like if cookie or something are missing for proxy in the vhost file

I got this is /varlog/apache2/error.log

[Mon Jun 28 00:53:32 2010] [error] [client 82.232.36.xxx] client denied by server configuration: proxy:http://127.0.0.1:9091/transmission/rpc, referer: http://dl.xxx.org/transmission/web/

and this in I got this is /varlog/apache2/access.log

82.232.36.xxx - - [28/Jun/2010:01:03:29 +0200] "POST /transmission/rpc HTTP/1.1" 403 862 "http://dl.xxx.org/transmission/web/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4"


if somebody have an idea why it's not working :)


There is my /etc/apache2/site-awailable/default

Code: Select all

<VirtualHost *:80>
RewriteEngine on

   ServerAdmin webmaster@localhost
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html
   
   DocumentRoot /var/www/
   <Directory />
      Options FollowSymLinks
      AllowOverride None
   </Directory>
   <Directory /var/www/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
   </Directory>

   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
   <Directory "/usr/lib/cgi-bin">
      AllowOverride None
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      Order allow,deny
      Allow from all
   </Directory>

   ErrorLog /var/log/apache2/error.log

   # Possible values include: debug, info, notice, warn, error, crit,
   # alert, emerg.
   LogLevel warn

   CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>




RewriteRule /transmission[/]?$ /transmission/web [R=permanent]
ProxyPass /transmission http://127.0.0.1:9091/transmission
ProxyPassReverse /transmission http://127.0.0.1:9091/transmission

<Location /transmission>

   Order Allow,Deny
   Allow from All

   # Make pictures, scripts and styling client-cacheable
   <IfModule expires_module>
      ExpiresActive On
      ExpiresByType image/gif A43200
      ExpiresByType image/png A43200
      ExpiresByType application/javascript A43200
      ExpiresByType text/css A43200
   </IfModule>

</Location>



</VirtualHost>


an there is my /etc/apache2/mods-available/proxy.conf

Code: Select all

<IfModule mod_proxy.c>
        #turning ProxyRequests on and allowing proxying from all may allow
        #spammers to use your proxy to send email.

        ProxyRequests Off

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                #Deny from all
                Allow from all
        </Proxy>

        # Enable/disable the handling of HTTP/1.1 "Via:" headers.
        # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
        # Set to one of: Off | On | Full | Block

        ProxyVia On
</IfModule>



And finally there is my settings.json

Code: Select all

{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "dht-enabled": true,
    "download-dir": "/home/ftp/bt",
    "encryption": 2,
    "incomplete-dir": "/home/transmission/.config/transmission-daemon/incomplete",
    "incomplete-dir-enabled": true,
    "lazy-bitfield-enabled": true,
    "lpd-enabled": false,
    "message-level": 2,
    "open-file-limit": 10,
    "peer-limit-global": 1000,
    "peer-limit-per-torrent": 100,
    "peer-port": 51413,
    "peer-port-random-high": 55535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": 0,
    "pex-enabled": true,
    "port-forwarding-enabled": false,
    "preallocation": 1,
    "proxy": "",
    "proxy-auth-enabled": false,
    "proxy-auth-password": "",
    "proxy-auth-username": "",
    "proxy-enabled": false,
    "proxy-port": 80,
    "proxy-type": 0,
    "ratio-limit": 2.0000,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-password": "{483ec74a13d5e905c0dc80a59a2dfc91ceb73ab3RNMDiL5Z",
    "rpc-port": 9091,
    "rpc-username": "bito",
    "rpc-whitelist": "127.0.0.1,82.232.36.197",
    "rpc-whitelist-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "speed-limit-down": 150000,
    "speed-limit-down-enabled": true,
    "speed-limit-up": 8000,
    "speed-limit-up-enabled": true,
    "start-added-torrents": true,
    "trash-original-torrent-files": true,
    "umask": 18,
    "upload-slots-per-torrent": 50,
    "watch-dir": "/home/transmission/.config/transmission-daemon/watch",
    "watch-dir-enabled": true
}


I will try again what google have to offer for tonight but I don't think i will do it alone ^^ I already tryed this post and some other howto around and they all do the same things:/

Good luck paf!

ps: it's really weird if I enter http://dl.xxx.org/transmission/web in a browser already logged in with dl.xx.org:9091/transmission/web it works.. but not in a news windows, even without any password recqueried anywhere.

exemple :

Code: Select all

82.232.36.197 - - [28/Jun/2010:02:05:15 +0200] "POST /transmission/rpc HTTP/1.1" 409 382 "http://dl.xxx.org/transmission/web/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4"
82.232.36.197 - - [28/Jun/2010:02:05:15 +0200] "POST /transmission/rpc HTTP/1.1" 200 421 "http://dl.xxx.org/transmission/web/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4"
82.232.36.197 - - [28/Jun/2010:02:05:15 +0200] "POST /transmission/rpc HTTP/1.1" 200 215 "http://dl.xxx.org/transmission/web/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4"
82.232.36.197 - - [28/Jun/2010:02:05:16 +0200] "POST /transmission/rpc HTTP/1.1" 200 5219 "http://dl.xxx.org/transmission/web/" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4"


Then 10 min later it will not work again before i first use the xxx.9091 first..

Azquelt
Posts: 12
Joined: Sun Jul 20, 2008 11:59 am

Re: how to redirect Transmission 1.34 to port 80?

Postby Azquelt » Mon Jun 28, 2010 7:28 am

paf.goncalves wrote:I'm trying to configure Apache, my config is:

Code: Select all

        ProxyPass /transmission http://localhost:8080/transmission
        ProxyPassReverse /transmission http://localhost:8080/transmission


It asks for password, i can login, but then it gives error:

Code: Select all

409: Conflict


Did this hapended with any of you ?


This only happens to me if I visit http://example.org/transmission rather than http://example.org/transmission/web/

Note also that the trailing slash is important.

thuerrsch
Posts: 3
Joined: Tue Aug 24, 2010 7:12 pm

Re: how to redirect Transmission 1.34 to port 80?

Postby thuerrsch » Tue Aug 24, 2010 7:31 pm

I also had trouble redirecting server:9091 to server/transmission using Apache. Following the "official" how-to at https://trac.transmissionbt.com/wiki/WebProxy, I could access server/transmission/web/, but I got conflict 409 errors whenever going to server/transmission, as intended. Same thing for server/transmission/web (without the trailing slash), server/transmission/, etc.

Turns out rewriting has to be enabled explicitly for a VirtualHost. I finally got the redirect working by throwing in these two lines inside the VirtualHost configuration for the transmission proxy:

Code: Select all

RewriteEngine On
RewriteOptions Inherit


See http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#vhosts.

thuerrsch
Posts: 3
Joined: Tue Aug 24, 2010 7:12 pm

Re: how to redirect Transmission 1.34 to port 80?

Postby thuerrsch » Tue Aug 24, 2010 7:55 pm

One more thing: Accessing server/transmission/ (with trailing slash) worked only after removing the first pair of brackets from:

Code: Select all

RewriteRule /transmission[/]?$ /transmission/web/ [R=permanent]

resulting in:

Code: Select all

RewriteRule /transmission/?$ /transmission/web [R=permanent]

Weird, it shouldn't make a difference. It seems it does. Very minor issue though.

LeiNaD_87
Posts: 1
Joined: Wed Nov 17, 2010 11:21 pm

Re: how to redirect Transmission 1.34 to port 80?

Postby LeiNaD_87 » Wed Nov 17, 2010 11:27 pm

This is part of my apache2 config...

I had a problem with /transmission/rpc so... I had added a new proxypass...

Code: Select all

    <Proxy *>
        Order Allow,Deny
        Allow from all
        AuthType Basic
        AuthName Transmission
        AuthUserFile /etc/apache2/passwd/passwords
        Require user leinad87
    </Proxy>

    Redirect permanent /torrents https://xxxx/transmission/web/
    ProxyPass /transmission/ http://localhost:9091/transmission/
    ProxyPass /transmission/web/ http://localhost:9091/transmission/web/
    ProxyPassReverse /transmission/web/ http://localhost:9091/transmission/web/


May be, the second ProxyPass isn't necessary, but if something works, don't touch! :D

PD: I don't speak English very well, sorry :oops:

Celox
Posts: 1
Joined: Sun Feb 13, 2011 2:35 pm

Re: how to redirect Transmission 1.34 to port 80?

Postby Celox » Sun Feb 13, 2011 2:39 pm

Hi,

i'm having the same problem with the latest version (2.21) the rewrite worked fine on the prev. version (2.13) i think it was.

Code: Select all

409: Conflict

Your request had an invalid session-id header.

To fix this, follow these steps:

   1. When reading a response, get its X-Transmission-Session-Id header and remember it
   2. Add the updated header to your outgoing requests
   3. When you get this 409 error message, resend your request with the updated header

This requirement has been added to help prevent CSRF attacks.

X-Transmission-Session-Id: ZUUdd56Fv5oxiVcNODSfTx6a18qeOgN6xJl8A4jecLv2F3IM


My Config for Lighty's rewrite:

Code: Select all

server.modules += ( "mod_rewrite", "mod_auth", "mod_proxy" )

url.rewrite-once += ( "^/transmission[/]?$" => "/transmission/web" )

$HTTP["url"] =~ "^/transmission" {
            proxy.server = (
                        "" => ((
                                    "host"            => "127.0.0.1",
                                    "port"            => 9091
                        ))
            )
}


I disabled auth (i don't use it) for my transmission so no need for auth config in lighty either.

Does anyone have an idea what needs to be changed?
Im kinda stuck here...

grisbilen
Posts: 1
Joined: Fri Apr 15, 2011 10:42 pm

Re: how to redirect Transmission 1.34 to port 80?

Postby grisbilen » Fri Apr 15, 2011 10:47 pm

This worked for me on a QNAP TS-419P+ NAS:
Turns out that in the end my issue was the trailing slash so i just added a rewrite rule to append the slash for the address /transmission/web and all works fine

Code: Select all

# Put this after the other LoadModule directives
LoadModule proxy_module /mnt/ext/opt/apache/modules/mod_proxy.so
LoadModule proxy_http_module /mnt/ext/opt/apache/modules/mod_proxy_http.so

ProxyRequests Off
ProxyPreserveHost On

RewriteEngine on

# Redirect requests to /transmission to /transmission/web
RewriteRule /transmission[/]?$ /transmission/web/ [R=permanent]
RewriteRule /transmission/web?$ /transmission/web/ [R=permanent]

#<Proxy *>
#    Order deny,allow
#    Allow from all
#</Proxy>

ProxyPass /transmission http://127.0.0.1:9091/transmission
ProxyPassReverse /transmission http://127.0.0.1:9091/transmission

<Location /transmission>
    Order deny,allow
    AuthName "secret place"
    AuthType Basic
    AuthUserFile /usr/local/apache/conf/passwd
    require user YOURUSER
</Location>

san
Posts: 3
Joined: Sat Oct 08, 2011 6:01 am

Re: how to redirect Transmission 1.34 to port 80?

Postby san » Sun Oct 09, 2011 10:59 pm

Code: Select all

san@serwer:~/www/transmission$ cat .htaccess
RewriteEngine On
RewriteOptions Inherit

RewriteRule     (.*) http://localhost:9091/transmission/$1 [P]


Works for me if i go to: http://mypage.com/transmission/web/
Does not work for http://mypage.com/transmission/

Code: Select all

san@serwer:~/www/transmission$ transmission-daemon -V
[00:57:10.840] Couldn't read "/home/san/.config/transmission-daemon/settings.json": Permission denied
Transmission 2.05 (11488)

san
Posts: 3
Joined: Sat Oct 08, 2011 6:01 am

Re: how to redirect Transmission 1.34 to port 80?

Postby san » Fri Dec 21, 2012 1:28 am

everything is well explained here: http://floss.zoomquiet.org/data/2009092 ... index.html
(unluckily i found it too late)

i made my own conf and it looks like:

Code: Select all

Alias /transmission /home/san/www/transmission

ProxyRequests Off
ProxyPreserveHost On
RewriteEngine on

# Redirect requests to /transmission to /transmission/web
RewriteRule /transmission[/]?$ /transmission/web [R=permanent]

# Forward all requests for /transmission to transmission-daemon
ProxyPass /transmission http://127.0.0.1:9091/transmission
ProxyPassReverse /transmission http://127.0.0.1:9091/transmission


<VirtualHost *:80>
   DocumentRoot /home/san/www/transmission       
   ServerName transmission.mypage.info
#   ServerAlias *.mypage.info

   # Other directives here

</VirtualHost>

<Directory /home/san/www/transmission>
   #Options FollowSymLinks
   DirectoryIndex index.php

   <IfModule mod_php5.c>
      AddType application/x-httpd-php .php

      php_flag magic_quotes_gpc Off
      php_flag track_vars On
      php_flag register_globals Off
      php_value include_path .
   </IfModule>

</Directory>


and my ~/www/transmission/.htaccess file:

Code: Select all

Redirect / http://mypage.info/transmission


Until now it does work when i go to transmission.mypage.info

It is old thread and sorry for reopening...

amdmiek
Posts: 1
Joined: Wed Feb 20, 2013 11:06 am

Re: how to redirect Transmission 1.34 to port 80?

Postby amdmiek » Wed Feb 20, 2013 11:12 am

Hello there.
I had same problem but when I tried that link
http://floss.zoomquiet.org/data/2009092 ... index.html

it's ALMOST work. But there's a 409 error with X-session headers.
I fixed it with:

ProxyVia On

The whole config:

Code: Select all

<VirtualHost *:80>

# Redirect requests to /transmission to /transmission/web
RewriteRule /transmission[/]?$ /transmission/web [R=permanent]

# Forward all requests for /transmission to transmission-daemon
ProxyPass /transmission http://127.0.0.1:4444/transmission
ProxyPassReverse /transmission http://127.0.0.1:4444/transmission

ProxyVia On

<Location /transmission>

   Order Allow,Deny
   Allow from All

   # Make pictures, scripts and styling client-cacheable
   <IfModule expires_module>
      ExpiresActive On
      ExpiresByType image/gif A43200
      ExpiresByType image/png A43200
      ExpiresByType application/javascript A43200
      ExpiresByType text/css A43200
   </IfModule>

</Location>
</VirtualHost>

Awesomefireduck
Posts: 1
Joined: Thu Jan 09, 2014 3:22 am

Re: how to redirect Transmission 1.34 to port 80?

Postby Awesomefireduck » Thu Jan 09, 2014 3:29 am

I did it.

this is my config file:
/etc/apache2/sites-enabled/0003-proxy -> ../sites-availible/proxy
you could also paste this in the default

Code: Select all

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
   Order allow,deny
   Allow from all
   RewriteEngine On
</Proxy>

#change IP's and ports as needed (only the transmission port is still the default port)

# transmission
   ProxyPass /transmission http://127.0.0.1:9091/transmission     # a trailing slash (like in the rest) would murder the header
   ProxyPassReverse /transmission http://127.0.0.1:9091/transmission   # that will get you a 409 error. (I don't know why)

# sabnzbd
   ProxyPass /sabnzbd/ http://192.168.178.200:9093/
   ProxyPassReverse /sabnzbd/ http://192.168.178.200:9093/

# couchpotato
   ProxyPass /couchpotato/ http://192.168.178.200:9094/couchpotato/
   ProxyPassReverse /couchpotato/ http://192.168.178.200:9094/couchpotato/

#sickbeard
   ProxyPass /sickbeard/ http://192.168.178.200:9092/sickbeard/
   ProxyPassReverse /sickbeard/ http://192.168.178.200:9092/sickbeard/

san
Posts: 3
Joined: Sat Oct 08, 2011 6:01 am

Re: how to redirect Transmission 1.34 to port 80?

Postby san » Wed Mar 19, 2014 12:01 am

Found better way than in my old, old, old post (i know it's quite late to bring it back up to live, but...).

One-file solution transmission.conf for apache2 (put it into /etc/apache2/conf.d for Ubuntu):

Code: Select all

ProxyRequests Off

<Proxy *>
        Order Allow,Deny
        Allow from all
</Proxy>

<VirtualHost *:80>
        ServerName transmission.PUT-YOUR-ADDRESS-HERE.info                   You can change 'transmission' if You want.
        Redirect / /transmission
</VirtualHost>

RewriteRule /transmission[/]?$ /transmission/web [R=permanent]

ProxyPass /transmission http://localhost:9091/transmission
ProxyPassReverse /transmission http://localhost:9091/transmission


No other files needed. Going to transmission.PUT-YOUR-ADDRESS-HERE.info will redirect You to PUT-YOUR-ADDRESS-HERE.info/transmission (i think) and then proxy/translate to localhost:9091.

Hope it works for You.

Regards!

edit.
instead of "Redirect / /transmission" i suggest to write "Redirect / http://PUT-YOUR-ADDRESS-HERE.info/transmission".
since first one will drop You into http://transmission.PUT-YOUR-ADDRESS-HE ... ansmission which does not look good and might not work, as the other drops You into http://PUT-YOUR-ADDRESS-HERE.info/transmission.

cnone
Posts: 1
Joined: Sat Apr 16, 2016 10:16 am

Re: how to redirect Transmission 1.34 to port 80?

Postby cnone » Sat Apr 16, 2016 10:21 am

san wrote:Found better way than in my old, old, old post (i know it's quite late to bring it back up to live, but...).

One-file solution transmission.conf for apache2 (put it into /etc/apache2/conf.d for Ubuntu):

Code: Select all

ProxyRequests Off

<Proxy *>
        Order Allow,Deny
        Allow from all
</Proxy>

<VirtualHost *:80>
        ServerName transmission.PUT-YOUR-ADDRESS-HERE.info                   You can change 'transmission' if You want.
        Redirect / /transmission
</VirtualHost>

RewriteRule /transmission[/]?$ /transmission/web [R=permanent]

ProxyPass /transmission http://localhost:9091/transmission
ProxyPassReverse /transmission http://localhost:9091/transmission


No other files needed. Going to transmission.PUT-YOUR-ADDRESS-HERE.info will redirect You to PUT-YOUR-ADDRESS-HERE.info/transmission (i think) and then proxy/translate to localhost:9091.

Hope it works for You.

Regards!

edit.
instead of "Redirect / /transmission" i suggest to write "Redirect / http://PUT-YOUR-ADDRESS-HERE.info/transmission".
since first one will drop You into http://transmission.PUT-YOUR-ADDRESS-HE ... ansmission which does not look good and might not work, as the other drops You into http://PUT-YOUR-ADDRESS-HERE.info/transmission.



Hello and sorry for bumping this old thread but I couldn't find any info regarding this.
I have tried your one file solution but apache gives me this:

Code: Select all

AH00526: Syntax error on line 13 of /etc/apache2/conf.d/transmission.conf:
Invalid command 'RewriteRule', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.


Can you please help me on this? I have defined virtual host as: transmission.mydoma.in on port 80 and I can acces webgui from this:
transmission.mydoma.in:9091. I want to eliminate the port section and try to worki it out on port 80.
Please help. Thanks in advance.

EDIT: I have eliminated this error with enabling rewrite module in moduleconfig. And removed transmission.mydoma.in from virtualhosts. But now given address redirects me to my rutorrent.mydoma.in.
I am totally lost in this :D

killemov
Posts: 352
Joined: Sat Jul 31, 2010 5:04 pm

Re: how to redirect Transmission 1.34 to port 80?

Postby killemov » Wed Apr 20, 2016 5:34 am

RTFM for Apache2. This has absolutely nothing to do with anything specific to transmission. There are simpler alternatives around like lighttpd.


Return to “Web Interface”