Bonsoir à tous,
Je viens vous voir car j'ai quelques soucis avec les sous domaines. Je profite d'être en vacance pour réinstaller mon serveur mais lorsque j'essaie d'installer les sous domaines cela ne fonctionne pas.
Alors en prérequis :
J'ai utiliser le script de Ex_Rat pour l’installation du serveur. (Super pratique un grand merci)
Avant j'utilisais le tuto de Meister pour mes sous domaines :
http://mondedie.fr/d/5378
Lorsque j'essai de lancer la commande
service nginx restart
J'ai :
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
J'ai comme réponse :
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: failed (Result: exit-code) since Fri 2015-08-21 19:07:41 CEST; 10min ago
Process: 12764 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 12352 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 12766 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 12353 (code=exited, status=0/SUCCESS)
Aug 21 19:07:41 BigData nginx[12766]: nginx: [emerg] "charset" directive is duplicate in /etc/nginx/sites-enabled/rutor...conf:10
Aug 21 19:07:41 BigData nginx[12766]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 21 19:07:41 BigData systemd[1]: nginx.service: control process exited, code=exited status=1
Aug 21 19:07:41 BigData systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Aug 21 19:07:41 BigData systemd[1]: Unit nginx.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
et
root@BigData:~# journalctl -xn
-- Logs begin at Fri 2015-08-21 18:05:22 CEST, end at Fri 2015-08-21 19:19:01 CEST. --
Aug 21 19:17:01 BigData CRON[14373]: (root) CMD (/usr/local/rtm/bin/rtm 5 > /dev/null 2> /dev/null)
Aug 21 19:17:01 BigData CRON[14374]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Aug 21 19:17:01 BigData CRON[14372]: pam_unix(cron:session): session closed for user root
Aug 21 19:17:01 BigData CRON[14371]: pam_unix(cron:session): session closed for user root
Aug 21 19:18:01 BigData CRON[14426]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 21 19:18:01 BigData CRON[14427]: (root) CMD (/usr/local/rtm/bin/rtm 5 > /dev/null 2> /dev/null)
Aug 21 19:18:01 BigData CRON[14426]: pam_unix(cron:session): session closed for user root
Aug 21 19:19:01 BigData CRON[14477]: pam_unix(cron:session): session opened for user root by (uid=0)
Aug 21 19:19:01 BigData CRON[14478]: (root) CMD (/usr/local/rtm/bin/rtm 5 > /dev/null 2> /dev/null)
Aug 21 19:19:01 BigData CRON[14477]: pam_unix(cron:session): session closed for user root
J'ai trouver une facon de configurer mon fichier rutorrent pour que le sous domaines fonctionne mais je ne peux pas en créer d'autre. Par exemple pour seedbox-manager ou autre ...
Voici donc celui qui fonctionne :
server {
listen 80 default_server;
listen 443 default_server ssl;
server_name domaine.mondomaine.fr;
root /var/www/rutorrent;
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;
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; }
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 proxy ##
location ^~ /proxy {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config proxy ##
## d but config rutorrent ##
location ^~ /rutorrent {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
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.conf;
include /etc/nginx/conf.d/cache.conf;
}
location ^~ /graph/img {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
error_log /dev/null crit;
}
location ^~ /monitoring {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config munin ##
## d but config seedbox-manager ##
location ^~ /seedbox-manager {
alias /var/www/seedbox-manager/public;
include /etc/nginx/conf.d/php-manager.conf;
include /etc/nginx/conf.d/cache.conf;
}
## fin config seedbox-manager ##
## config utilisateurs ##
location /X {
include scgi_params;
scgi_pass 127.0.0.X:500X; #ou socket : unix:/home/username/.session/username.socket
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_gaume";
}
}
Ma question est donc comme faire pour avoir des dossiers types nano /etc/nginx/sites-enabled/rutorrent.conf
ou
nano /etc/nginx/sites-enabled/manager.conf
qui fonctionne comme avant ?[/s]
Edit: Comment configurer les fichiers config pour avoir des sous domaine qui fonctionne ?
Merci d'avance