use realip module in nginx to log true client IP
This commit is contained in:
parent
c136e5c406
commit
0d9d932491
1 changed files with 12 additions and 0 deletions
|
@ -4,6 +4,12 @@
|
||||||
server_name _;
|
server_name _;
|
||||||
root /mnt/repos-production/mirror;
|
root /mnt/repos-production/mirror;
|
||||||
|
|
||||||
|
# Fastly sets the client IP in this header (and it cannot be overriden by user)
|
||||||
|
real_ip_header Fastly-Client-IP;
|
||||||
|
real_ip_recursive on;
|
||||||
|
set_real_ip_from 10.32.0.0/16;
|
||||||
|
set_real_ip_from ::/0;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
autoindex on;
|
autoindex on;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +47,12 @@
|
||||||
ssl_certificate_key /etc/pki/tls/private/dl.rockylinux.org.key;
|
ssl_certificate_key /etc/pki/tls/private/dl.rockylinux.org.key;
|
||||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
|
||||||
|
# Fastly sets the client IP in this header (and it cannot be overriden by user)
|
||||||
|
real_ip_header Fastly-Client-IP;
|
||||||
|
real_ip_recursive on;
|
||||||
|
set_real_ip_from 10.32.0.0/16;
|
||||||
|
set_real_ip_from ::/0;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
autoindex on;
|
autoindex on;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue