Hello,
J’ai un petit souci, quand j’essaye de contacter une page qui n’existe pas sur mon serveur web (nginx) je suis automatique rediriger à la racine du serveur tout en gardant le mauvaise url. Donc ma page par défaut, pouvez-vous m’aidez à régler ce problème s’il vous plait ?
Voici mon rutorrent.conf qui ce trouve dans /etc/nginx/sites-enabled (j'ai utiliser le
script d'installation automatique de ruTorrent d'ex_rat) :
server {
listen 80 default_server;
server_name _;
rewrite ^ https://mon-domaine.eu$request_uri? permanent;
}
server {
listen 443 ssl;
server_name mon-domaine.eu;
index index.html index.php;
charset utf-8;
ssl on;
ssl_certificate /etc/nginx/keys/mon-domaine.eu.crt-unified;
ssl_certificate_key /etc/nginx/keys/mon-domaine.eu.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 de config wordpress ##
location ^~ / {
root /var/www/wordpress;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
try_files $uri $uri/ /index.php?q=$uri&$args;
satisfy any;
allow all;
}
## Fin de config wordpress ###
## Début config linux-dash ##
location ^~ /dash {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
## Fin config linux-dash ##
## Début de config pastebin ##
location ^~ /pastebin {
root /var/www/;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
try_files $uri $uri/ /index.php?q=$uri&$args;
satisfy any;
allow all;
}
## Fin de config pastebin ###
## Début de config h5ai ##
location ^~ /downloads {
root /var/www/wordpress;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
#On appelle h5ai
index index.html index.php /_h5ai/server/php/index.php;
#On autorise le listing des fichiers
autoindex on;
#On n'utilise pas auth de rutorrent
auth_basic "Vous devez vous authentifier";
auth_basic_user_file "/etc/nginx/passwd/user_passwd";
}
## Fin de config h5ai ###
## début config codiad ##
location ^~ /codiad {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
}
## fin config codiad ##
## Début config TeamSpeak ##
location ^~ /teamspeak {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
}
## Fin config TeamSpeak ##
## Début config proxy ##
location ^~ /proxy {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
## Fin config proxy ##
## 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 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;
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 ##
location /DL {
include scgi_params;
scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session/username.socket
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_dl";
}
}