Alors je viens de trouver une solution affreuse pour les puristes (tout du moins je suppose) mais ça fonctionne. J'ai donc garder le fichier de base:
nano /etc/nginx/sites-enabled/rutorrent.conf
server {
listen 80 default_server;
listen 443 default_server ssl;
server_name _;
index index.html index.php;
charset utf-8;
client_max_body_size 10M;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
access_log /var/log/nginx/rutorrent-access.log combined;
error_log /var/log/nginx/rutorrent-error.log error;
error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location = /favicon.ico {
access_log off;
log_not_found off;
}
## début config accueil serveur ##
location ^~ / {
root /var/www/base;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
}
## fin config accueil serveur ##
## début config rutorrent ##
location ^~ /rutorrent {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
location ~ /\.svn {
deny all;
}
location ~ /\.ht {
deny all;
}
}
location ^~ /rutorrent/conf/ {
deny all;
}
location ^~ /rutorrent/share/ {
deny all;
}
## fin config rutorrent ##
## Début config cakebox 2.8 ##
location ^~ /cakebox {
root /var/www/;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
location /cakebox/downloads {
root /var/www;
satisfy any;
allow all;
}
## fin config cakebox 2.8 ##
## début config munin ##
location ^~ /graph {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
location ^~ /graph/img {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
#log_not_found off;
error_log /dev/null crit;
}
location ^~ /monitoring {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
## fin config munin ##
## début config seedbox-manager ##
location ^~ /seedbox-manager {
alias /var/www/seedbox-manager/public;
include /etc/nginx/conf.d/php-manager;
include /etc/nginx/conf.d/cache;
}
## fin config seedbox-manager ##
## config utilisateurs ##
}
Puis j'ai rajouter les autres fichiers du type
nano /etc/nginx/sites-enabled/rutorrentX.conf
server {
listen 80;
server_name rutorrent.<votre domaine> www.rutorrent.<votre domaine>;
return 301 https://rutorrent.<votre domaine>$request_uri;
}
server {
listen 443;
server_name rutorrent.<votre domaine>;
index index.html index.php;
charset utf-8;
client_max_body_size 10M;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
access_log /var/log/nginx/rutorrent-access.log combined;
error_log /var/log/nginx/rutorrent-error.log error;
error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }
auth_basic "Login";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location = /var/www/rutorrent/favicon.ico {
access_log off;
return 204;
}
## début config rutorrent ##
location ^~ / {
root /var/www/rutorrent;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
location ~ /\.svn {
deny all;
}
location ~ /\.ht {
deny all;
}
}
location ^~ /conf/ {
deny all;
}
location ^~ /share/ {
deny all;
}
## fin config rutorrent ##
## début config user ##
location /<USERNAME> {
include scgi_params;
scgi_pass 127.0.0.1:500{x};
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_<username>";
}
## fin config user ##
}
nano /etc/nginx/sites-enabled/manager.conf
server {
listen 80;
server_name manager.<votre domaine> www.manager.<votre domaine>;
return 301 https://manager.<votre domaine>$request_uri;
}
server {
listen 443;
server_name manager.<votre domaine>;
index index.html index.php;
charset utf-8;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
access_log /var/log/nginx/rutorrent-access.log combined;
error_log /var/log/nginx/rutorrent-error.log error;
error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }
auth_basic "Login";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location = /var/www/seedbox-manager/favicon.ico {
access_log off;
return 204;
}
## début config seedbox-manager ##
location ^~ / {
root /var/www/seedbox-manager/public;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
## fin config seedbox-manager ##
}
Et avec cette config j'ai accès via mes sous domaine. Si quelqu'un a une idée du pourquoi je suis tout ouïe car cette solution, bien quelle me convienne me semble un peu comment dire ?
Être du bricolage .....
Merci d'avance