how to redirect Transmission 1.34 to port 80?
how to redirect Transmission 1.34 to port 80?
Hello
here my current and working setup:
* apache webserver running a website on port 80 (my.site.com)
* transmission webserver running on port 9091 (my.site.com:9091/transmission/web/)
what i want to do is to have access to transmission webserver on port 80 (my.site.com/transmission/web/) but my other webserver must also works on port 80
is possible ? any idea ?
thanks
here my current and working setup:
* apache webserver running a website on port 80 (my.site.com)
* transmission webserver running on port 9091 (my.site.com:9091/transmission/web/)
what i want to do is to have access to transmission webserver on port 80 (my.site.com/transmission/web/) but my other webserver must also works on port 80
is possible ? any idea ?
thanks
Re: how to redirect Transmission 1.34 to port 80?
Yes, its possible.
You have to configure Apache to do it, and there are many ways to go about it:
The proxy is the more interesting, I use something similar (but with Squid) combined with a ssh tunnel. Since I have Squid, I haven't used Apache's proxy capabilities and don't know much about how to define the correct alias that will make the proxy communicate with transmission-daemon and how does that work with the constant chatter the Web client does.
You'll get a better answer at the Apache user's list (or documentation which you may have already installed, try http://my.site.com/manual).
You have to configure Apache to do it, and there are many ways to go about it:
- Define a redirection alias: "Redirect /transmission/web/ http://my.site.com:9091/transmission/web/"
- Configure and use Apache as proxy, which has the advantage of not having to open the 9091 port to the Internet
- Use rewrite rule... complex way to control what gets proxied.
The proxy is the more interesting, I use something similar (but with Squid) combined with a ssh tunnel. Since I have Squid, I haven't used Apache's proxy capabilities and don't know much about how to define the correct alias that will make the proxy communicate with transmission-daemon and how does that work with the constant chatter the Web client does.
You'll get a better answer at the Apache user's list (or documentation which you may have already installed, try http://my.site.com/manual).
Re: how to redirect Transmission 1.34 to port 80?
I've just spent a while finding out how to do this.
If you have transmission running on the same computer as Apache, enable the following modules:
Ubuntu and Debian users probably just need to run
Then add the following to your apache config file:
This lets Apache work as a reverse proxy, forwarding requests to the transmission directory to localhost:9091 and back again. (I'm not sure that the ProxyPassReverse line is necessary for transmission as it should only be needed if it uses absolute URLs).
You can put any authentication directives in the <Proxy> block
You should then be able to access the transmission interface at http://mydomain/transmission/web
If that's too long for you, you can add a redirect to your apache config like this:
My whole config file for the ssl side of my web server looks like this:
Edit: 2008-12-06 -- Added the bit about loading modules
Edit: 2009-05-10 -- Added where to access the transmission interface after setting up apache
If you have transmission running on the same computer as Apache, enable the following modules:
Code: Select all
mod_proxy
mod_proxy_http
Code: Select all
a2enmod proxy
a2enmod proxy_http
Code: Select all
ProxyRequests Off
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
ProxyPass /transmission http://localhost:9091/transmission
ProxyPassReverse /transmission http://localhost:9091/transmission
You can put any authentication directives in the <Proxy> block
You should then be able to access the transmission interface at http://mydomain/transmission/web
If that's too long for you, you can add a redirect to your apache config like this:
Code: Select all
Redirect permanent /torrents https://mydomain/transmission/web
Code: Select all
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot /var/www/gnat
SSLEngine on
SSLOptions +ExportCertData +StrictRequire
SSLCertificateFile /etc/ssl/certs/apache.crt
SSLCertificateKeyFile /etc/ssl/private/apache.key
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/gnat>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ProxyRequests Off
<Proxy *>
Order Allow,Deny
Allow from all
AuthType Basic
AuthName Transmission
AuthUserFile /etc/apache2/users
Require user me
</Proxy>
Redirect permanent /torrents https://mydomain/transmission/web
ProxyPass /transmission http://localhost:9091/transmission
ProxyPassReverse /transmission http://localhost:9091/transmission
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
ServerSignature On
</VirtualHost>
Edit: 2009-05-10 -- Added where to access the transmission interface after setting up apache
Last edited by Azquelt on Sun May 10, 2009 2:43 pm, edited 2 times in total.
Re: how to redirect Transmission 1.34 to port 80?
thx you, it works !
Re: how to redirect Transmission 1.34 to port 80?
Well i made the changes but the WebUI is messed up. What could i have made wrong?
Re: how to redirect Transmission 1.34 to port 80?
it looks like stylesheet (stylesheets/common.css) is missing or improperly linked or not accessible..bluey wrote:Well i made the changes but the WebUI is messed up. What could i have made wrong?
Re: how to redirect Transmission 1.34 to port 80?
Well the WebUI itself is working as it should. Only the redirection is broken.
here is my vhost config
here is my vhost config
<IfDefine SSL>
<IfDefine SSL_DEFAULT_VHOST>
<IfModule ssl_module>
Listen 443
<VirtualHost _default_:443>
ServerName mythtv
DocumentRoot /var/www/localhost/htdocs
SSLEngine on
SSLOptions +ExportCertData +StrictRequire
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
<Directory /var/www/localhost/htdocs>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AuthType Basic
AuthName Transmission
AuthUserFile /etc/apache2/users
Require user myself
</Directory>
ProxyRequests Off
<Proxy *>
Order Allow,Deny
Allow from all
AuthType Basic
AuthName Transmission
AuthUserFile /etc/apache2/users
Require user myself
</Proxy>
ProxyPass /transmission http://localhost:9091/transmission/web/
ProxyPassReverse /transmission http://localhost:9091/transmission/web/
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
</IfModule>
</IfDefine>
</IfDefine>
# vim: ts=4 filetype=apache
Re: how to redirect Transmission 1.34 to port 80?
That should bebluey wrote:
ProxyPass /transmission http://localhost:9091/transmission/web/
ProxyPassReverse /transmission http://localhost:9091/transmission/web/
Code: Select all
ProxyPass /transmission http://localhost:9091/transmission
ProxyPassReverse /transmission http://localhost:9091/transmission
Re: how to redirect Transmission 1.34 to port 80?
Edited my instructions above to include loading the necessary modules.
Thanks to Abe on IRC.
Thanks to Abe on IRC.
-
- Posts: 21
- Joined: Sun Dec 09, 2007 2:18 pm
Re: how to redirect Transmission 1.34 to port 80?
For lighty, use the following configuration. You can remove the 'auth' block, I use it so that only authorized users can access the web interface. I know transmisson itself can do authentication, but I'd rather keep all the access control in one place (lighty) instead of scattered all over the web services.
Right now the URL has to be /transmission, it's not easily possible to have the Web UI under a different URL. This will change once ticket 1538 is merged into trunk. Then you'll be able to have the Web UI under any URL you wish.
Right now the URL has to be /transmission, it's not easily possible to have the Web UI under a different URL. This will change once ticket 1538 is merged into trunk. Then you'll be able to have the Web UI under any URL you wish.
Code: Select all
server.modules += ( "mod_rewrite", "mod_auth", "mod_proxy" )
url.rewrite-once += ( "^/transmission[/]?$" => "/transmission/web" )
$HTTP["url"] =~ "^/transmission/" {
auth.backend = "plain"
auth.backend.plain.userfile = "/var/www/transmission/users"
auth.require = (
"" => (
"method" => "digest",
"realm" => "Transmission Web Interface",
"require" => "valid-user"
)
)
proxy.server = (
"" => (
(
"host" => "127.0.0.1",
"port" => 9091
)
)
)
}
Re: how to redirect Transmission 1.34 to port 80?
Hi,
Just tried the same thing, but can't access to transmission webinterface one redirected by the apache proxy :
I go to http://services.mydomain.com and then, get the crendential ask (so, that seems to mean that the redirection is performed succesfully), but then, I got a 404 error…
Accessing directly to the webinterface by http://192.168.0.1:9091 works…
Here is the file used :
I just got this in access.log (nothing in error.log)
Thanks!
Just tried the same thing, but can't access to transmission webinterface one redirected by the apache proxy :
I go to http://services.mydomain.com and then, get the crendential ask (so, that seems to mean that the redirection is performed succesfully), but then, I got a 404 error…
Accessing directly to the webinterface by http://192.168.0.1:9091 works…
Here is the file used :
Code: Select all
<VirtualHost *:80>
CustomLog /var/log/apache2/access_stat.log combined
DocumentRoot /home/data/www/www/
ServerName services.mydomain.com
Options -Indexes FollowSymLinks
Alias /munin/ /var/www/munin/
Alias /munin /var/www/munin/
<Directory /var/www/munin/>
Options FollowSymLinks
AllowOverride None
#authentification
AuthType Basic
AuthName "Private stat access"
AuthUserFile /home/data/www/.htpasswd
require valid-user
</Directory>
Alias /piwik/ /home/data/www/piwik/
Alias /piwik /home/data/www/piwik/
<Directory /home/data/www/piwik/>
Options -Indexes FollowSymLinks
AllowOverride None
</Directory>
ProxyRequests Off
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass /transmission http://localhost:9091/transmission
ProxyPassReverse /transmission http://localhost:9091/transmission
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
</VirtualHost>
Any idea?192.168.0.254 - - [10/May/2009:16:08:03 +0200] "GET /transmission HTTP/1.1" 401 32 "-" "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10"
192.168.0.254 - - [10/May/2009:16:08:03 +0200] "GET /transmission HTTP/1.1" 404 32 "-" "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10"
Thanks!
Re: how to redirect Transmission 1.34 to port 80?
Try accessing http://services.mydomain.com/transmission/web rather than http://services.mydomain.com/transmission
Added this note to the instructions above.
Added this note to the instructions above.
Re: how to redirect Transmission 1.34 to port 80?
Thanks a lot, I get now the interface, but…
I can't upload torrent file (it does nothing when uploading),
I can see numbers changing (peers, downloading rates) ,
I can interact with existing torrent (pausing/resuming), but I got regularly some "Connection Failed. Could not connect to the server. You may need to reload the page to reconnect." error (let's say, after 10 seconds) and then, no refresh.
Strange, seems that transmission web connexion is dropped by apache?
All works like a charm from the same browser and PC using http://192.168.0.1:9091
I can't upload torrent file (it does nothing when uploading),
I can see numbers changing (peers, downloading rates) ,
I can interact with existing torrent (pausing/resuming), but I got regularly some "Connection Failed. Could not connect to the server. You may need to reload the page to reconnect." error (let's say, after 10 seconds) and then, no refresh.
Strange, seems that transmission web connexion is dropped by apache?
All works like a charm from the same browser and PC using http://192.168.0.1:9091
Re: how to redirect Transmission 1.34 to port 80?
Strange, it's working today
My apache seems to be happier !
Thanks a lot for this great software.
My apache seems to be happier !
Thanks a lot for this great software.
-
- Posts: 1
- Joined: Thu Jun 24, 2010 7:11 pm
Re: how to redirect Transmission 1.34 to port 80?
Hi!
I'm trying to configure Apache, my config is:
It asks for password, i can login, but then it gives error:
Did this hapended with any of you ?
I'm trying to configure Apache, my config is:
Code: Select all
ProxyPass /transmission http://localhost:8080/transmission
ProxyPassReverse /transmission http://localhost:8080/transmission
Code: Select all
409: Conflict
Your request had an invalid session-id header.
To fix this, follow these steps:
When reading a response, get its X-Transmission-Session-Id header and remember it
Add the updated header to your outgoing requests
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: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx