- Modifié
root@sd-xxxx:/var/www/cakebox# service nginx restart
[....] Restarting nginx: nginxnginx: [emerg] unknown directive "..." in /etc/nginx/sites-enabled/rutorrent.conf:41
nginx: configuration file /etc/nginx/nginx.conf test failed
root@sd-xx:/var/www/cakebox#
[....] Restarting nginx: nginxnginx: [emerg] unknown directive "..." in /etc/nginx/sites-enabled/rutorrent.conf:41
nginx: configuration file /etc/nginx/nginx.conf test failed
root@sd-xx:/var/www/cakebox#
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 ##
...
## 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;
}
location /cakebox/<remy/ {
alias /home/remy/torrents/;
add_header Content-Disposition "attachment";
satisfy any;
allow all;
}
## etc si d'autre utilisateur ##
## fin config cakebox-light ##
...
}
## 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 ##
etc ....