You are not logged in.
TLDR: How do I get Rutorrent to work again
Hi I have problems with my RuTorrent web interface.
I can Run rtorrent No problem there.
But i Followed the instructions:
First of all, you have to replace the httpd.conf with the newer httpd.pacnew in /etc/httpd/conf/
After that, you have to install php-fpm and add the line in /etc/php/php-fpm.conf:
listen = 127.0.0.1:9000
instead of:
listen = /run/php-fpm/php-fpm.sock
Finally add the following line in /etc/httpd/conf/httpd.conf:
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/srv/http/$1
Start/Restart php-fpm and httpd daemons
And i got my php to work again.
Now I need to get SCGI to work with php I belive.
As the rutorrent wiki says:
Once you have mod_scgi installed and loaded, adding scgi mounts is almost trival.
add something like this for each mount:
SCGIMount /RPC2 127.0.0.1:5000
Mod Proxy SCGI
Recently, i have found this module. In some situations this might be a better fit (though i have no idea of the performance differences between mod_scgi and mod_proxy_scgi) On OpenSolaris, for instance, there is no mod_scgi package, but mod_proxy_scgi comes with the default apache config.
It's very simple to use, just add a directive like:
ProxyPass /RPC2 scgi://localhost:5000/
SCGI mount does not work and apache will not start. ProxyPass will work but as I don't know how to install it i can't continue.
I also need to add:
Edit the open_basedir value in /etc/php/php.ini to include:
/etc/webapps/rutorrent/conf/:/usr/share/webapps/rutorrent/php/:/usr/share/webapps/rutorrent/
But as I think I'm using php-fpm atm I have no clue where to add this?
Offline
It seems due to the last apache update, mod_scgi stops working.
Offline
Try to use nginx instead of apache/lighttpd. Mine is working now.
Offline
I have ruTorrent working on Apache doing what you did but using the following ProxyPassMatch -
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/webapps/$1
I am still having basedir problems and am also not sure where to set this.
Offline
I have ruTorrent working on Apache doing what you did but using the following ProxyPassMatch -
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/webapps/$1
ProxyPassMatch is tricky if you have different directories for your php files. You'll have to use the directory from the Alias in the ProxyPassMatch directive to find the right document root.
You might find it easier to use mod_proxy_handler which should detect the file path automatically.
I am still having basedir problems and am also not sure where to set this.
Set it in /etc/php/php.ini. This file is also used with php-fpm if you don't change it with a commandline parameter.
You could also use the override in php-fpm.conf
php_admin_value[open_basedir] = /path/one:/path/two:/path/three
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Thanks progandy
My basedir problem is now resolved. I had difficulty noticing that I had inadvertently separated one of the directories with a semi-colon rather than a colon and hence it was only parsing the first part of my basedir argument.
All working nicely now.
Offline
I can get ruTorrent to run with:
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/webapps/$1
but now i get:
[09.03.2014 13:14:08] WebUI started.
[09.03.2014 13:14:08] Bad response from server: (404 [error,getplugins]) File not found.
[09.03.2014 13:14:08] Bad response from server: (404 [error,getuisettings]) File not found.
Another strange thing is that the php test file works in 1 directory but not in root directory. There i can only download it.
I did try out nginx but I can't get the php to work with it the wiki is a bit cryptic.
I would like to change from apache to nginx.
Offline
I can get ruTorrent to run with:
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/webapps/$1
but now i get:
[09.03.2014 13:14:08] WebUI started.
[09.03.2014 13:14:08] Bad response from server: (404 [error,getplugins]) File not found.
[09.03.2014 13:14:08] Bad response from server: (404 [error,getuisettings]) File not found.
I assume that your rutorrent files are installed in the /usr/share/webapps/rutorrent directory?
Also, when you get it working, you may need the following option in both your php-fpm.service and httpd.service files:
PrivateTmp=false
To avoid this message:
rTorrent user can't access 'id' program. Some functionality will be unavailable.
Offline
Yes ru torrent is installed in the default location as you pointed out.
I seem to be stuck at the stage where I need to load the Scgi module:
Load the SCGI module in /etc/httpd/conf/httpd.conf:
LoadModule scgi_module modules/mod_scgi.so
My service will not start if i add this line
Enable SCGI on the port you chose for rTorrent by adding this to /etc/httpd/conf/httpd.conf:
SCGIMount /RPC2 127.0.0.1:5000
Neither will the service start if i add this to the httpd.conf
Any ideas?
Offline
Instead of SCGIMount, you should be using ProxyPass with apache 2.4 I think. mod_proxy_scgi is already part of the default configuration, so just add the following line:
ProxyPass /RPC2 scgi://localhost:5000/
Edit: If you are wondering why I suggest ProxyPass here, SCGIMount and ProxyPass seem to work in the same manner. This means there is no problem with using ProxyPass. On the other hand, php-scripts often are mixed in with "normal" files and that makes a ProxyPass configuration a bit difficult.
Last edited by progandy (2014-03-10 18:15:41)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I actually had
"ProxyPass /RPC2 scgi://localhost:5000/"
already set from reading the ruTorrent wiki.
I added
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/webapps/rutorrent/$1
But it still gives me the same errors and will not connect to rtorrent
Another odd thing is that i need to do the 192.168.0.3/rutorrent/index.html and not just the folder to get access to ruTorrent.
Offline
I'm not sure where your problem lies. I have a working WebUI with this:
- working php setup, I use mod_proxy_handler. https://wiki.archlinux.org/index.php/LAMP#PHP
- added /etc/webapps to open_basedir in /etc/php/php.ini
- /RPC2 bound with ProxyPass
- set $tempDirectory = "/tmp/rtorrent";
Last edited by progandy (2014-03-10 20:15:42)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Maby it's a good idea to start over from the beginning. How can I recreate the default config files?
Offline