diff --git a/nginxsite b/nginxsite new file mode 100644 index 0000000..e910f3c --- /dev/null +++ b/nginxsite @@ -0,0 +1,38 @@ +server { + listen 80; + server_name ; + return 301 https://$server_name$request_uri; +} + +server { + listen 443 ssl; + + server_name ; + root /var/www; + index index.html index.php index.htm; + + ssl_certificate /etc/ssl/ruweb.crt; + ssl_certificate_key /etc/ssl/ruweb.key; + ssl_session_timeout 5m; + + location / { + try_files $uri $uri/ =404; + } + + location ^~ /rutorrent { + auth_basic "Restricted"; + auth_basic_user_file /var/www/rutorrent/.htpasswd; + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; +# fastcgi_pass 127.0.0.1:9000; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + } + } + + location ~ /\.ht { + deny all; + } + +}