Created
February 8, 2019 16:51
-
-
Save heartofrevel/6891a25169bbd28eeb785bd622dd8515 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
#server_name <Domain Name>; | |
root /var/www; | |
index index.html index.php index.htm; | |
error_page 403 = @denied; | |
#Below enter IP address or block to allow, eg LAN and/or VPN blocks | |
allow 10.0.0.0/8; | |
allow 172.16.0.0/12; | |
allow 192.168.0.0/16; | |
deny all; | |
location @denied { | |
return 301 https://$host$request_uri; | |
} | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
location /rutorrent { | |
auth_basic "Restricted"; | |
auth_basic_user_file /etc/nginx/.htpasswd; | |
include /etc/nginx/conf.d/php; | |
include /etc/nginx/conf.d/cache; | |
} | |
#include /etc/nginx/sites-available/dload-loc; | |
location ~ /\.ht { | |
deny all; | |
} | |
} | |
server { | |
listen 443 ssl; | |
#server_name <Domain Name>; | |
root /var/www; | |
index index.html index.php index.htm; | |
client_max_body_size 40m; | |
ssl_certificate /etc/ssl/ruweb.crt; | |
ssl_certificate_key /etc/ssl/private/ruweb.key; | |
ssl_session_timeout 5m; | |
location / { | |
try_files $uri $uri/ =404; | |
} | |
location /rutorrent { | |
client_max_body_size 40m; | |
auth_basic "Restricted"; | |
auth_basic_user_file /etc/nginx/.htpasswd; | |
include /etc/nginx/conf.d/php; | |
include /etc/nginx/conf.d/cache; | |
} | |
#include /etc/nginx/sites-available/dload-loc; | |
include /etc/nginx/sites-available/webmin-loc; | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment