Bonsoir,
J'ai un dédié avec rutorrent installé via le script d'installation automatique et cakebox installé manuellement. et plex qui est installé mais auquel je voudrais accéder via l'url "http://plex.Nom_de_domaine" Ou encore mieux "
http://Nom _De_Domaine/plex" (mais si ce n'est pas possible ou trop compliqué je ne ferais pas l'exigeant et me contenterai de la première url.) au lieu de "http://Ip_Du_Serveur/web/index.html
Je ne comprends pas où créer un vhost pour accéder à plex via cette url j'ai essayé de l'intéger au fichier "rutorrent.conf" ou de faire un fichier "plex.conf" à part dans "/etc/nginx/sites-enabled" en suivant la partie "Bonus" de ce formidable
tuto .
Mais ça ne marche pas j'ai des trucs du genre "not found", j'ai essayé de créer un sous domaine via mon panel de mon gestionnaire de domaine mais celui ci redirige vers la page d'accueil de nginx.
Voici mes fichiers config :
Rutorrent :
server {
listen 80 default_server;
listen 443 default_server ssl http2;
server_name _;
index index.html index.php;
charset utf-8;
client_max_body_size 10M;
ssl_certificate /etc/letsencrypt/live/NOMDEDOMAINE/fullchain.pe$
ssl_certificate_key /etc/letsencrypt/live/NOMDEDOMAINE/privkey.$
include /etc/nginx/conf.d/ciphers.conf;
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; }
error_page 404 /404.html;
location = /404.html { root /usr/share/nginx/html; }
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.conf;
include /etc/nginx/conf.d/cache.conf;
try_files $uri $uri/ /index.php?q=$uri&$args;
satisfy any;
allow all;
}
## fin config accueil serveur ##
## d but config rutorrent ##
location ^~ /rutorrent {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location ~ /\.svn {
deny all;
}
location ~ /\.ht {
deny all;
}
}
location ^~ /rutorrent/conf/ {
deny all;
}
location ^~ /rutorrent/share/ {
deny all;
}
## fin config rutorrent ##
location /MONUSER {
include scgi_params;
scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session$
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_MONUSER";
}
## debut config cakebox-light ##
location /cakebox/ {
rewrite ^/cakebox(/.*)$ $1 break;
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
}
location /cakebox/MONUSER/ {
alias /home/MONUSER/team/;
add_header Content-Disposition "attachment";
satisfy any;
allow all;
}
## etc si d'autre utilisateur ##
## fin config cakebox-light ##
}
Et Cakebox si c'est nécessaire :
server {
listen 81;
server_name _;
root /var/www/cakebox/public;
index index.php;
allow 127.0.0.1; # only the proxy
deny all;
charset utf-8;
include /etc/nginx/conf.d/cache.conf;
access_log /var/log/nginx/cakebox-access.log;
error_log /var/log/nginx/cakebox-error.log;
error_page 404 /404.html;
location = /404.html { root /usr/share/nginx/html; }
location = / {
try_files @site @site;
}
location / {
try_files $uri $uri/ @site;
}
location ~ \.php$ {
return 404;
}
location @site {
fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_param APPLICATION_ENV production;
## uncomment when running via https
## fastcgi_param HTTPS on;
}
Des détails que je pense pas nécessairement utiles mais que je vais donner : Le HSTS n'est pas activé et le fichiers pour protéger la seedbox ne sont pas au même endroit que de base, c'est normal (si ça gène je peux remettre comme avant.) et cakebox ne scanne pas le dossier "torrents", c'est normal. Tout marche tout fonctionne je veux juste accéder à plex via mon nom de domaine et non via l'adresse ip du serveur.
Voilà, en vous remerciant.