Create nginxsite

This commit is contained in:
arakasi72
2014-09-19 18:46:22 +01:00
parent 30cb414ccf
commit a30e82d72a
+38
View File
@@ -0,0 +1,38 @@
server {
listen 80;
server_name <Server IP>;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name <Server IP>;
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;
}
}