Answer the question
In order to leave comments, you need to log in
nginx. Why does the $server_addr directive only return the server's local ip?
Hello.
There is an nginx server on the network.
Inside his ip, let
's say 192.168.100.10 Outside NAT, his ip 52.200.200.10
There is a $server_addr directive in Nginx, which, judging by the description:
$server_addr, эта переменная равна адресу сервера, на который пришёл запрос. Как правило, для получения значения этой переменной делается один системный вызов.
server {
listen 80;
server_name example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name example.com;
......................................
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question