mirror of
https://github.com/linuxserver/docker-swag.git
synced 2024-12-24 23:09:34 -05:00
added suggested changes
This commit is contained in:
parent
3ac3035efd
commit
891aa6bc71
@ -30,6 +30,12 @@ server {
|
|||||||
# enable for Authelia
|
# enable for Authelia
|
||||||
#include /config/nginx/authelia-server.conf;
|
#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;
|
client_max_body_size 0;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
@ -30,54 +30,66 @@ map $geoip2_data_country_code $allowed_country {
|
|||||||
|
|
||||||
|
|
||||||
# Server config example:
|
# 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) {
|
# if ($allowed_country = no) {
|
||||||
# return 444;
|
# 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 {
|
#server {
|
||||||
# listen 443 ssl http2 default_server;
|
# listen 443 ssl;
|
||||||
# listen [::]:443 ssl http2 default_server;
|
# listen [::]:443 ssl;
|
||||||
#
|
#
|
||||||
# root /config/www;
|
# server_name unifi.*;
|
||||||
# index index.html index.htm index.php;
|
|
||||||
#
|
#
|
||||||
# server_name _;
|
|
||||||
|
|
||||||
|
|
||||||
# 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;
|
# include /config/nginx/ssl.conf;
|
||||||
#
|
#
|
||||||
# # enable for ldap auth
|
# client_max_body_size 0;
|
||||||
|
#
|
||||||
|
# # enable for ldap auth, fill in ldap details in ldap.conf
|
||||||
# #include /config/nginx/ldap.conf;
|
# #include /config/nginx/ldap.conf;
|
||||||
#
|
#
|
||||||
# # enable for Authelia
|
# # enable for Authelia
|
||||||
# #include /config/nginx/authelia-server.conf;
|
# #include /config/nginx/authelia-server.conf;
|
||||||
#
|
|
||||||
# client_max_body_size 0;
|
|
||||||
|
# # Country geo block
|
||||||
|
# if ($allowed_country = no) {
|
||||||
|
# return 444;
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# location / {
|
# location / {
|
||||||
# try_files $uri $uri/ /index.html /index.php?$args =404;
|
# # enable the next two lines for http auth
|
||||||
# }
|
# #auth_basic "Restricted";
|
||||||
|
# #auth_basic_user_file /config/nginx/.htpasswd;
|
||||||
#
|
#
|
||||||
# location ~ \.php$ {
|
# # enable the next two lines for ldap auth
|
||||||
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
# #auth_request /auth;
|
||||||
# fastcgi_pass 127.0.0.1:9000;
|
# #error_page 401 =200 /ldaplogin;
|
||||||
# fastcgi_index index.php;
|
#
|
||||||
# include /etc/nginx/fastcgi_params;
|
# # enable for Authelia
|
||||||
|
# #include /config/nginx/authelia-location.conf;
|
||||||
|
#
|
||||||
|
# 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;
|
||||||
|
#
|
||||||
|
# proxy_buffering off;
|
||||||
# }
|
# }
|
||||||
#}
|
#}
|
||||||
|
Loading…
Reference in New Issue
Block a user