real ip pour Nginx
This commit is contained in:
parent
a01e2052ce
commit
7747b84f1a
2 changed files with 7 additions and 0 deletions
|
@ -4,9 +4,13 @@ server {
|
|||
root /var/www/81;
|
||||
index index.html;
|
||||
# include /etc/nginx/snippets/letsencrypt.conf;
|
||||
ssh_certificate ;
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 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.
|
||||
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 a new issue