|
@@ -7,14 +7,6 @@ map $http_x_forwarded_proto $client_req_scheme {
|
|
https https;
|
|
https https;
|
|
}
|
|
}
|
|
|
|
|
|
-geo $non_internal {
|
|
|
|
- default 1;
|
|
|
|
- 10.0.0.0/8 0;
|
|
|
|
- 172.16.0.0/12 0;
|
|
|
|
- 192.168.0.0/16 0;
|
|
|
|
- fc00::/7 0;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
server {
|
|
server {
|
|
include /etc/nginx/mime.types;
|
|
include /etc/nginx/mime.types;
|
|
charset utf-8;
|
|
charset utf-8;
|
|
@@ -33,10 +25,6 @@ server {
|
|
include /etc/nginx/conf.d/listen_plain.active;
|
|
include /etc/nginx/conf.d/listen_plain.active;
|
|
include /etc/nginx/conf.d/server_name.active;
|
|
include /etc/nginx/conf.d/server_name.active;
|
|
|
|
|
|
- if ($non_internal) {
|
|
|
|
- return 302 https://$server_name$uri$is_args$args;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
error_log /var/log/nginx/error.log;
|
|
error_log /var/log/nginx/error.log;
|
|
access_log /var/log/nginx/access.log;
|
|
access_log /var/log/nginx/access.log;
|
|
absolute_redirect off;
|
|
absolute_redirect off;
|