Hi everyone,
I've just finished install my server with rtorrent + rutorrent, but I have actually a little problem with multiple user usage.
So, for now I have 2 users we will call USER1 and USER2.
Dirs for both users :
/home/USER1/rtorrent/
ls -a -l
drwxr-xr-x 4 root root 4096 Apr 21 12:46 download
drwxr-xr-x 2 root root 4096 Apr 21 14:19 .session
drwxr-xr-x 2 root root 4096 Apr 20 16:38 watch
and
/home/USER2/rtorrent/
ls -a -l
drwxr-xr-x 6 root root 4096 Apr 22 06:56 download
drwxr-xr-x 2 root root 4096 Apr 22 07:24 .session
drwxr-xr-x 2 root root 4096 Apr 21 09:29 watch
.rtorrent.rc file :
/home/USER1/
Code:
[...]
# Default directory to save the downloaded torrents.
directory = /home/USER1/rtorrent/download
# Default session directory. Make sure you don't run multiple instance
# of seeder1rent using the same session directory. Perhaps using a
# relative path?
session = /home/USER1/rtorrent/.session
# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=/home/USER1/rtorrent/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=
# Close torrents when diskspace is low. */
schedule = low_diskspace,5,60,close_low_diskspace=100M
# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
#schedule = ratio,60,60,stop_on_ratio=200,200M,2000
# When the torrent finishes, it executes "mv -n <base_path> ~/Download/"
# and then sets the destination directory to "~/Download/". (0.7.7+)
# on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,/home/USER1/download/complete/ ;d.set_directory=/home/USER1/download/complete/"
# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no
# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1
#bind = rakshasa.no
# Port range to use for listening.
port_range = 55995-56000
# Start opening ports at a random position within the port range.
#port_random = yes
scgi_port = 127.0.0.1:5000
[...]
/home/USER2/
Code:
[...]
# Default directory to save the downloaded torrents.
directory = /home/USER2/rtorrent/download
# Default session directory. Make sure you don't run multiple instance
# of seeder1rent using the same session directory. Perhaps using a
# relative path?
session = /home/USER2/rtorrent/.session
# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=/home/USER2/rtorrent/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=
# Close torrents when diskspace is low. */
schedule = low_diskspace,5,60,close_low_diskspace=100M
# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
#schedule = ratio,60,60,stop_on_ratio=200,200M,2000
# When the torrent finishes, it executes "mv -n <base_path> ~/Download/"
# and then sets the destination directory to "~/Download/". (0.7.7+)
# on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,/home/USER2/download/complete/ ;d.set_directory=/home/USER2/download/complete/"
# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no
# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1
#bind = rakshasa.no
# Port range to use for listening.
port_range = 56001-56005
# Start opening ports at a random position within the port range.
#port_random = yes
scgi_port = 127.0.0.1:5001
[...]
Apache2 configuration :
/etc/apache2/apache2.conf
At the end of the file
Code:
SCGIMount /RPC2 127.0.0.1:5000
SCGIMount /RPC3 127.0.0.1:5001
servername localhost
I have to domains managed by ISPConfig which we will call domaine1.com and domaine2.com
The content of the vhost :
/etc/apache2/sites-enabled/100-domaine2.com.vhost :
Code:
<Directory /var/www/domaine2.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/domaine2.com/web
ServerName domaine2.com
ServerAlias www.domaine2.com
ServerAdmin [email protected]
ErrorLog /var/log/ispconfig/httpd/domaine2.com/error.log
<IfModule mod_ssl.c>
</IfModule>
<Directory /var/www/domaine2.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client3/web7/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule mod_fcgid.c>
IdleTimeout 300
ProcessLifeTime 3600
# MaxProcessCount 1000
DefaultMinClassProcessCount 0
DefaultMaxClassProcessCount 100
IPCConnectTimeout 3
IPCCommTimeout 360
BusyTimeout 300
</IfModule>
<Directory /var/www/domaine2.com/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client3/web7/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName domaine2.com
ServerAlias www.domaine2.com
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
DocumentRoot /var/www/clients/client3/web7/web/rutorrent
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/clients/client3/web7/web/rutorrent>
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>
<Location />
AuthType Digest
AuthName "seedbox"
AuthDigestDomain /var/www/clients/client3/web7/web/rutorrent/ http://127.0.0.1/rutorrent
AuthDigestProvider file
AuthUserFile /etc/apache2/passwords
Require valid-user
SetEnv R_ENV "/var/www/clients/client3/web7/web/rutorrent"
</Location>
</VirtualHost>
And domaine1.com
/etc/apche2/sites-enabled/100-domaine1.com.vhost :
Code:
<Directory /var/www/domaine1.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/domaine1.com/web
ServerName domaine1.com
ServerAlias www.domaine1.com
ServerAlias torrent.domaine1.com
ErrorLog /var/log/ispconfig/httpd/domaine1.com/error.log
<IfModule mod_ssl.c>
</IfModule>
<Directory /var/www/domaine1.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web3/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# php as fast-cgi enabled
# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
<IfModule mod_fcgid.c>
IdleTimeout 300
ProcessLifeTime 3600
# MaxProcessCount 1000
DefaultMinClassProcessCount 0
DefaultMaxClassProcessCount 100
IPCConnectTimeout 3
IPCCommTimeout 360
BusyTimeout 300
</IfModule>
<Directory /var/www/domaine1.com/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web3/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web3/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web3/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Location /rutorrent>
AuthType Digest
AuthName "seedbox"
AuthDigestDomain /var/www/clients/client1/web3/web/rutorrent/ http://127.0.0.1/rutorrent
AuthDigestProvider file
AuthUserFile /etc/apache2/passwords
Require valid-user
SetEnv R_ENV "/var/www/clients/client1/web3/web/rutorrent"
</Location>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^torrent\.domaine1\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/rutorrent/
RewriteRule ^/(.*)$ /rutorrent/$1 [L]
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName domaine1.com
ServerAlias torrent.domaine1.com
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
DocumentRoot /var/www/clients/client1/web3/web/rutorrent
RewriteCond %{HTTP_HOST} ^torrent\.domaine1\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/rutorrent/
RewriteRule ^/(.*)$ /rutorrent/$1 [L]
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/clients/client1/web3/web/rutorrent>
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>
<Location />
AuthType Digest
AuthName "seedbox"
AuthDigestDomain /var/www/clients/client1/web3/web/rutorrent/ http://127.0.0.1/rutorrent
AuthDigestProvider file
AuthUserFile /etc/apache2/passwords
Require valid-user
SetEnv R_ENV "/var/www/clients/client1/web3/web/rutorrent"
</Location>
</VirtualHost>
And the config.php from rutorrent :
for USER1:
/var/www/clients/client1/web3/web/rutorrent/conf/config.php
Code:
<?php
[...]
$scgi_port = 5000;
$scgi_host = "127.0.0.1";
// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
$XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
[...]
and for USER2:
/var/www/clients/client3/web7/web/rutorrent/conf/config.php :
Code:
<?php
[...]
$scgi_port = 5001;
$scgi_host = "127.0.0.1";
// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
$XMLRPCMountPoint = "/RPC3"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
$pathToExternals = array(
[...]
And finally my rtorrent scripts for launching rtorrent instances :
/etc/init.d/rtorrent:
Code:
#!/bin/bash
### BEGIN INIT INFO
# Provides: rtorrent.USER1
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Start-Stop rtorrent USER1 session
### END INIT INFO
#############
###<Notes>###
#############
# This script depends on screen.
# For the stop function to work, you must set an
# explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc.
# If you typically just start rtorrent with just "rtorrent" on the
# command line, all you need to change is the "user" option.
# Attach to the screen session as your user with
# "screen -dr rtorrent". Change "rtorrent" with srnname option.
# Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com
##############
###</Notes>###
##############
#######################
##Start Configuration##
#######################
# You can specify your configuration in a different file
# (so that it is saved with upgrades, saved in your home directory,
# or whateve reason you want to)
# by commenting out/deleting the configuration lines and placing them
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would
# have written them here (you can leave the comments if you desire
# and then uncommenting the following line correcting the path/filename
# for the one you used. note the space after the ".".
# . /etc/rtorrent.init.conf
#Do not put a space on either side of the equal signs e.g.
# user = user
# will not work
# system user to run as
user="USER1"
# the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"`
# the full path to the filename where you store your rtorrent configuration
config="/home/USER1/.rtorrent.rc"
# set of options to run with
options=""
# default directory for screen, needs to be an absolute path
base="/home/USER1"
# name of screen session
srnname="rtorrent"
# file to log to (makes for easier debugging if something goes wrong)
logfile="/var/log/rtorrentInit.log"
#######################
###END CONFIGURATION###
#######################
[...]
and rtorrent2 for USER2 :
Code:
#!/bin/bash
### BEGIN INIT INFO
# Provides: rtorrent.USER2
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Start-Stop rtorrent USER2 session
### END INIT INFO
#############
###<Notes>###
#############
# This script depends on screen.
# For the stop function to work, you must set an
# explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc.
# If you typically just start rtorrent with just "rtorrent" on the
# command line, all you need to change is the "user" option.
# Attach to the screen session as your user with
# "screen -dr rtorrent". Change "rtorrent" with srnname option.
# Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com
##############
###</Notes>###
##############
#######################
##Start Configuration##
#######################
# You can specify your configuration in a different file
# (so that it is saved with upgrades, saved in your home directory,
# or whateve reason you want to)
# by commenting out/deleting the configuration lines and placing them
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would
# have written them here (you can leave the comments if you desire
# and then uncommenting the following line correcting the path/filename
# for the one you used. note the space after the ".".
# . /etc/rtorrent.init.conf
#Do not put a space on either side of the equal signs e.g.
# user = user
# will not work
# system user to run as
user="USER2"
# the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"`
# the full path to the filename where you store your rtorrent configuration
config="/home/USER2/.rtorrent.rc"
# set of options to run with
options=""
# default directory for screen, needs to be an absolute path
base="/home/USER2"
# name of screen session
srnname="rtorrent"
# file to log to (makes for easier debugging if something goes wrong)
logfile="/var/log/rtorrentInit.log"
#######################
###END CONFIGURATION###
#######################
[...]
The command give me this result :
root:/home/USER1/rtorrent# /etc/init.d/rtorrent start
Starting rtorrent: rtorrent.
root:/home/USER1/rtorrent# /etc/init.d/rtorrent2 start
Starting rtorrent: rtorrent.
But no rtorrent in the process list, but rtorrent command work good.
So in my Log of rutorrent for USER1 and https://torrent.domaine1.com
I have :
Quote
But for USER2 on https://domaine2.com
I have
Quote
which is normal because /etc/init.d/rtorrent2 doesn't want to execute neither /etc/init.d/rtorrent only rtorrent works
So, what am I doing wrong ?
Thank you in advance for your help.
I've just finished install my server with rtorrent + rutorrent, but I have actually a little problem with multiple user usage.
So, for now I have 2 users we will call USER1 and USER2.
Dirs for both users :
/home/USER1/rtorrent/
ls -a -l
drwxr-xr-x 4 root root 4096 Apr 21 12:46 download
drwxr-xr-x 2 root root 4096 Apr 21 14:19 .session
drwxr-xr-x 2 root root 4096 Apr 20 16:38 watch
and
/home/USER2/rtorrent/
ls -a -l
drwxr-xr-x 6 root root 4096 Apr 22 06:56 download
drwxr-xr-x 2 root root 4096 Apr 22 07:24 .session
drwxr-xr-x 2 root root 4096 Apr 21 09:29 watch
.rtorrent.rc file :
/home/USER1/
Code:
[...]
# Default directory to save the downloaded torrents.
directory = /home/USER1/rtorrent/download
# Default session directory. Make sure you don't run multiple instance
# of seeder1rent using the same session directory. Perhaps using a
# relative path?
session = /home/USER1/rtorrent/.session
# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=/home/USER1/rtorrent/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=
# Close torrents when diskspace is low. */
schedule = low_diskspace,5,60,close_low_diskspace=100M
# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
#schedule = ratio,60,60,stop_on_ratio=200,200M,2000
# When the torrent finishes, it executes "mv -n <base_path> ~/Download/"
# and then sets the destination directory to "~/Download/". (0.7.7+)
# on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,/home/USER1/download/complete/ ;d.set_directory=/home/USER1/download/complete/"
# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no
# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1
#bind = rakshasa.no
# Port range to use for listening.
port_range = 55995-56000
# Start opening ports at a random position within the port range.
#port_random = yes
scgi_port = 127.0.0.1:5000
[...]
/home/USER2/
Code:
[...]
# Default directory to save the downloaded torrents.
directory = /home/USER2/rtorrent/download
# Default session directory. Make sure you don't run multiple instance
# of seeder1rent using the same session directory. Perhaps using a
# relative path?
session = /home/USER2/rtorrent/.session
# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=/home/USER2/rtorrent/watch/*.torrent
schedule = untied_directory,5,5,stop_untied=
# Close torrents when diskspace is low. */
schedule = low_diskspace,5,60,close_low_diskspace=100M
# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
# example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
#schedule = ratio,60,60,stop_on_ratio=200,200M,2000
# When the torrent finishes, it executes "mv -n <base_path> ~/Download/"
# and then sets the destination directory to "~/Download/". (0.7.7+)
# on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,/home/USER2/download/complete/ ;d.set_directory=/home/USER2/download/complete/"
# The ip address reported to the tracker.
#ip = 127.0.0.1
#ip = rakshasa.no
# The ip address the listening socket and outgoing connections is
# bound to.
#bind = 127.0.0.1
#bind = rakshasa.no
# Port range to use for listening.
port_range = 56001-56005
# Start opening ports at a random position within the port range.
#port_random = yes
scgi_port = 127.0.0.1:5001
[...]
Apache2 configuration :
/etc/apache2/apache2.conf
At the end of the file
Code:
SCGIMount /RPC2 127.0.0.1:5000
SCGIMount /RPC3 127.0.0.1:5001
servername localhost
I have to domains managed by ISPConfig which we will call domaine1.com and domaine2.com
The content of the vhost :
/etc/apache2/sites-enabled/100-domaine2.com.vhost :
Code:
<Directory /var/www/domaine2.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/domaine2.com/web
ServerName domaine2.com
ServerAlias www.domaine2.com
ServerAdmin [email protected]
ErrorLog /var/log/ispconfig/httpd/domaine2.com/error.log
<IfModule mod_ssl.c>
</IfModule>
<Directory /var/www/domaine2.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client3/web7/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule mod_fcgid.c>
IdleTimeout 300
ProcessLifeTime 3600
# MaxProcessCount 1000
DefaultMinClassProcessCount 0
DefaultMaxClassProcessCount 100
IPCConnectTimeout 3
IPCCommTimeout 360
BusyTimeout 300
</IfModule>
<Directory /var/www/domaine2.com/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client3/web7/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName domaine2.com
ServerAlias www.domaine2.com
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
DocumentRoot /var/www/clients/client3/web7/web/rutorrent
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/clients/client3/web7/web/rutorrent>
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>
<Location />
AuthType Digest
AuthName "seedbox"
AuthDigestDomain /var/www/clients/client3/web7/web/rutorrent/ http://127.0.0.1/rutorrent
AuthDigestProvider file
AuthUserFile /etc/apache2/passwords
Require valid-user
SetEnv R_ENV "/var/www/clients/client3/web7/web/rutorrent"
</Location>
</VirtualHost>
And domaine1.com
/etc/apche2/sites-enabled/100-domaine1.com.vhost :
Code:
<Directory /var/www/domaine1.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/domaine1.com/web
ServerName domaine1.com
ServerAlias www.domaine1.com
ServerAlias torrent.domaine1.com
ErrorLog /var/log/ispconfig/httpd/domaine1.com/error.log
<IfModule mod_ssl.c>
</IfModule>
<Directory /var/www/domaine1.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web3/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# php as fast-cgi enabled
# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
<IfModule mod_fcgid.c>
IdleTimeout 300
ProcessLifeTime 3600
# MaxProcessCount 1000
DefaultMinClassProcessCount 0
DefaultMaxClassProcessCount 100
IPCConnectTimeout 3
IPCCommTimeout 360
BusyTimeout 300
</IfModule>
<Directory /var/www/domaine1.com/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web3/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web3/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web3/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Location /rutorrent>
AuthType Digest
AuthName "seedbox"
AuthDigestDomain /var/www/clients/client1/web3/web/rutorrent/ http://127.0.0.1/rutorrent
AuthDigestProvider file
AuthUserFile /etc/apache2/passwords
Require valid-user
SetEnv R_ENV "/var/www/clients/client1/web3/web/rutorrent"
</Location>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^torrent\.domaine1\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/rutorrent/
RewriteRule ^/(.*)$ /rutorrent/$1 [L]
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName domaine1.com
ServerAlias torrent.domaine1.com
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
DocumentRoot /var/www/clients/client1/web3/web/rutorrent
RewriteCond %{HTTP_HOST} ^torrent\.domaine1\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/rutorrent/
RewriteRule ^/(.*)$ /rutorrent/$1 [L]
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/clients/client1/web3/web/rutorrent>
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>
<Location />
AuthType Digest
AuthName "seedbox"
AuthDigestDomain /var/www/clients/client1/web3/web/rutorrent/ http://127.0.0.1/rutorrent
AuthDigestProvider file
AuthUserFile /etc/apache2/passwords
Require valid-user
SetEnv R_ENV "/var/www/clients/client1/web3/web/rutorrent"
</Location>
</VirtualHost>
And the config.php from rutorrent :
for USER1:
/var/www/clients/client1/web3/web/rutorrent/conf/config.php
Code:
<?php
[...]
$scgi_port = 5000;
$scgi_host = "127.0.0.1";
// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
$XMLRPCMountPoint = "/RPC2"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
[...]
and for USER2:
/var/www/clients/client3/web7/web/rutorrent/conf/config.php :
Code:
<?php
[...]
$scgi_port = 5001;
$scgi_host = "127.0.0.1";
// For web->rtorrent link through unix domain socket
// (scgi_local in rtorrent conf file), change variables
// above to something like this:
//
// $scgi_port = 0;
// $scgi_host = "unix:///tmp/rpc.socket";
$XMLRPCMountPoint = "/RPC3"; // DO NOT DELETE THIS LINE!!! DO NOT COMMENT THIS LINE!!!
$pathToExternals = array(
[...]
And finally my rtorrent scripts for launching rtorrent instances :
/etc/init.d/rtorrent:
Code:
#!/bin/bash
### BEGIN INIT INFO
# Provides: rtorrent.USER1
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Start-Stop rtorrent USER1 session
### END INIT INFO
#############
###<Notes>###
#############
# This script depends on screen.
# For the stop function to work, you must set an
# explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc.
# If you typically just start rtorrent with just "rtorrent" on the
# command line, all you need to change is the "user" option.
# Attach to the screen session as your user with
# "screen -dr rtorrent". Change "rtorrent" with srnname option.
# Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com
##############
###</Notes>###
##############
#######################
##Start Configuration##
#######################
# You can specify your configuration in a different file
# (so that it is saved with upgrades, saved in your home directory,
# or whateve reason you want to)
# by commenting out/deleting the configuration lines and placing them
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would
# have written them here (you can leave the comments if you desire
# and then uncommenting the following line correcting the path/filename
# for the one you used. note the space after the ".".
# . /etc/rtorrent.init.conf
#Do not put a space on either side of the equal signs e.g.
# user = user
# will not work
# system user to run as
user="USER1"
# the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"`
# the full path to the filename where you store your rtorrent configuration
config="/home/USER1/.rtorrent.rc"
# set of options to run with
options=""
# default directory for screen, needs to be an absolute path
base="/home/USER1"
# name of screen session
srnname="rtorrent"
# file to log to (makes for easier debugging if something goes wrong)
logfile="/var/log/rtorrentInit.log"
#######################
###END CONFIGURATION###
#######################
[...]
and rtorrent2 for USER2 :
Code:
#!/bin/bash
### BEGIN INIT INFO
# Provides: rtorrent.USER2
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Start-Stop rtorrent USER2 session
### END INIT INFO
#############
###<Notes>###
#############
# This script depends on screen.
# For the stop function to work, you must set an
# explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc.
# If you typically just start rtorrent with just "rtorrent" on the
# command line, all you need to change is the "user" option.
# Attach to the screen session as your user with
# "screen -dr rtorrent". Change "rtorrent" with srnname option.
# Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com
##############
###</Notes>###
##############
#######################
##Start Configuration##
#######################
# You can specify your configuration in a different file
# (so that it is saved with upgrades, saved in your home directory,
# or whateve reason you want to)
# by commenting out/deleting the configuration lines and placing them
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would
# have written them here (you can leave the comments if you desire
# and then uncommenting the following line correcting the path/filename
# for the one you used. note the space after the ".".
# . /etc/rtorrent.init.conf
#Do not put a space on either side of the equal signs e.g.
# user = user
# will not work
# system user to run as
user="USER2"
# the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"`
# the full path to the filename where you store your rtorrent configuration
config="/home/USER2/.rtorrent.rc"
# set of options to run with
options=""
# default directory for screen, needs to be an absolute path
base="/home/USER2"
# name of screen session
srnname="rtorrent"
# file to log to (makes for easier debugging if something goes wrong)
logfile="/var/log/rtorrentInit.log"
#######################
###END CONFIGURATION###
#######################
[...]
The command give me this result :
root:/home/USER1/rtorrent# /etc/init.d/rtorrent start
Starting rtorrent: rtorrent.
root:/home/USER1/rtorrent# /etc/init.d/rtorrent2 start
Starting rtorrent: rtorrent.
But no rtorrent in the process list, but rtorrent command work good.
So in my Log of rutorrent for USER1 and https://torrent.domaine1.com
I have :
Quote
[22.04.2013 14:07:58] WebUI started.[22.04.2013 14:08:01] mediainfo: Le plug-in ne fonctionnera pas. rTorrent ne peut pas accéder au(x) programme(s) externe(s). (mediainfo).[22.04.2013 14:08:01] screenshots: Le plug-in ne fonctionnera pas. rTorrent ne peut pas accéder au(x) programme(s) externe(s). (ffmpeg).
But for USER2 on https://domaine2.com
I have
Quote
[22.04.2013 14:06:37] WebUI started.[22.04.2013 14:06:37] Lien incorrect avec rTorrent. Vérifier qu'il est bien en cours d'exécution. Vérifier la configuration de $scgi_port et de $scgi_host dans config.php et scgi_port dans le fichier de configuration de rTorrent.
which is normal because /etc/init.d/rtorrent2 doesn't want to execute neither /etc/init.d/rtorrent only rtorrent works
So, what am I doing wrong ?
Thank you in advance for your help.