real ip pour Nginx
This commit is contained in:
parent
a01e2052ce
commit
7747b84f1a
|
@ -4,9 +4,13 @@ server {
|
||||||
root /var/www/81;
|
root /var/www/81;
|
||||||
index index.html;
|
index index.html;
|
||||||
# include /etc/nginx/snippets/letsencrypt.conf;
|
# include /etc/nginx/snippets/letsencrypt.conf;
|
||||||
|
ssh_certificate ;
|
||||||
location / {
|
location / {
|
||||||
# First attempt to serve request as file, then
|
# First attempt to serve request as file, then
|
||||||
# as directory, then fall back to displaying a 404.
|
# as directory, then fall back to displaying a 404.
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
|
set_real_ip_from 127.0.0.1;
|
||||||
|
real_ip_recursive on;
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,4 +9,7 @@ server {
|
||||||
# as directory, then fall back to displaying a 404.
|
# as directory, then fall back to displaying a 404.
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
|
set_real_ip_from 127.0.0.1;
|
||||||
|
real_ip_recursive on;
|
||||||
|
real_ip_header X-Forwarded-For;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue