user nginx;
worker_processes auto;
pid /var/run/nginx.pid;
events { worker_connections 1024; }
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log combined;
error_log /var/log/nginx/error.log error;
sendfile on;
keepalive_timeout 20;
keepalive_disable msie6;
keepalive_requests 100;
tcp_nopush on;
tcp_nodelay off;
server_tokens off;
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 5;
gzip_disable "msie6";
gzip_min_length 20;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application$
gzip_vary on;
include /etc/nginx/sites-enabled/*.conf;
}
server {
listen 80 default_server;
listen 443 default_server ssl;
server_name _;
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 "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location = /favicon.ico {
access_log off;
return 204;
}
## 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;
}
location /DAR0 {
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_darky";
}
## fin config rutorrent ##
j'ai fait le tuto et je block
erreur
nginx: configuration file /etc/nginx/nginx.conf test failed
je comprend pas ...
Edit : cette commande saire simplement a créer l'utilisateur right ?
useradd -s /bin/bash --home /home/<username> <username>
passwd <username>
si j'ai fait autrement cela peut changer quel que chose ?
p.s avant de l'installer j'ai créer un shell bash et l'utilisateur a été créer avec sa
if [ $(id -u) -ne 0 ]
then
echo
echo "This script must be run as root." 1>&2
echo
exit 1
fi
# demander nom et mot de passe
read -p "Adding user now, please type your user name: " user
read -s -p "Enter password: " pwd
echo
# ajout utilisateur
useradd -m -s /bin/bash "$user"
# creation du mot de passe pour cet utilisateur
echo "${user}:${pwd}" | chpasswd
-----------une autre question
comment je fait pour ajouter le code en shell bash a l'endroit précis ou il doit etre
server {
## début config rutorrent ##
...
## fin config rutorrent ##
}
merci d'avance