added suggested changes

This commit is contained in:
Marius 2020-09-22 17:16:01 +02:00
parent 3ac3035efd
commit 891aa6bc71
2 changed files with 50 additions and 32 deletions

View File

@ -30,6 +30,12 @@ server {
# enable for Authelia
#include /config/nginx/authelia-server.conf;
# enable for geo blocking
# See /config/nginx/geoip2.conf for more information.
#if ($allowed_country = no) {
#return 444;
#}
client_max_body_size 0;
location / {

View File

@ -30,54 +30,66 @@ map $geoip2_data_country_code $allowed_country {
# Server config example:
# Add the following if statement inside any server context you want to geo block.
# Add the following if statement inside any server context where you want to geo block countries.
# COUNTRY GEO BLOCK
########################################
# if ($allowed_country = no) {
# return 444;
# }
#########################################
# Full example:
# Add the following if statement inside any server context where you want to geo block cities.
########################################
# if ($allowed_city = no) {
# return 444;
# }
#########################################
# Example using a config from proxy-confs
# sample config for "default" with the geo block added
#server {
# listen 443 ssl http2 default_server;
# listen [::]:443 ssl http2 default_server;
# listen 443 ssl;
# listen [::]:443 ssl;
#
# root /config/www;
# index index.html index.htm index.php;
# server_name unifi.*;
#
# server_name _;
# include /config/nginx/ssl.conf;
#
# client_max_body_size 0;
#
# # enable for ldap auth, fill in ldap details in ldap.conf
# #include /config/nginx/ldap.conf;
#
# # enable for Authelia
# #include /config/nginx/authelia-server.conf;
# COUNTRY GEO BLOCK
# if ($allowed_country = no) {
# return 444;
# }
# # Country geo block
# if ($allowed_country = no) {
# return 444;
# }
# # enable subfolder method reverse proxy confs
# include /config/nginx/proxy-confs/*.subfolder.conf;
#
# # all ssl related config moved to ssl.conf
# include /config/nginx/ssl.conf;
# location / {
# # enable the next two lines for http auth
# #auth_basic "Restricted";
# #auth_basic_user_file /config/nginx/.htpasswd;
#
# # enable for ldap auth
# #include /config/nginx/ldap.conf;
# # enable the next two lines for ldap auth
# #auth_request /auth;
# #error_page 401 =200 /ldaplogin;
#
# # enable for Authelia
# #include /config/nginx/authelia-server.conf;
# # enable for Authelia
# #include /config/nginx/authelia-location.conf;
#
# client_max_body_size 0;
# include /config/nginx/proxy.conf;
# resolver 127.0.0.11 valid=30s;
# set $upstream_app unifi-controller;
# set $upstream_port 8443;
# set $upstream_proto https;
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;
#
# location / {
# try_files $uri $uri/ /index.html /index.php?$args =404;
# }
#
# location ~ \.php$ {
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# include /etc/nginx/fastcgi_params;
# }
# proxy_buffering off;
# }
#}