@@ -6,14 +6,41 @@ server {
6
6
7
7
#error_page 404 /error/404.html;
8
8
9
- client_max_body_size 10M ; # change this
10
- #set_real_ip_from 172.16.0.0/12;
11
- #set_real_ip_from 192.168.0.0/16;
12
- #set_real_ip_from 10.0.0.0/8;
13
- #real_ip_header X-Forwarded-For;
14
- #real_ip_header X-Real-IP;
15
- proxy_hide_header X-Powered-By;
9
+ ## FILE UPLOADS
10
+ #client_max_body_size 10M;
16
11
12
+ ## REAL VISITOR IP
13
+ # local
14
+ set_real_ip_from 172.16.0.0 /12 ;
15
+ set_real_ip_from 10.0.0.0 /8;
16
+ set_real_ip_from 192.168.0.0 /16 ;
17
+ # cloudflare
18
+ #set_real_ip_from 103.21.244.0/22;
19
+ #set_real_ip_from 103.22.200.0/22;
20
+ #set_real_ip_from 103.31.4.0/22;
21
+ #set_real_ip_from 104.16.0.0/13;
22
+ #set_real_ip_from 104.24.0.0/14;
23
+ #set_real_ip_from 108.162.192.0/18;
24
+ #set_real_ip_from 131.0.72.0/22;
25
+ #set_real_ip_from 141.101.64.0/18;
26
+ #set_real_ip_from 162.158.0.0/15;
27
+ #set_real_ip_from 172.64.0.0/13;
28
+ #set_real_ip_from 173.245.48.0/20;
29
+ #set_real_ip_from 188.114.96.0/20;
30
+ #set_real_ip_from 190.93.240.0/20;
31
+ #set_real_ip_from 197.234.240.0/22;
32
+ #set_real_ip_from 198.41.128.0/17;
33
+ #set_real_ip_from 2400:cb00::/32;
34
+ #set_real_ip_from 2606:4700::/32;
35
+ #set_real_ip_from 2803:f800::/32;
36
+ #set_real_ip_from 2405:b500::/32;
37
+ #set_real_ip_from 2405:8100::/32;
38
+ #set_real_ip_from 2a06:98c0::/29;
39
+ #set_real_ip_from 2c0f:f248::/32;
40
+ # use XFF header to parse real IP
41
+ real_ip_header X-Forwarded-For;
42
+ real_ip_recursive on;
43
+
17
44
access_log /var/log/nginx/access.log;
18
45
error_log /var/log/nginx/error.log;
19
46
@@ -26,7 +53,8 @@ server {
26
53
fastcgi_buffer_size 32k ;
27
54
include fastcgi_params;
28
55
}
29
-
56
+
57
+ proxy_hide_header X-Powered-By;
30
58
server_tokens off;
31
59
etag off;
32
60
}
0 commit comments