Use rewrite to jump. I want to know if I can get the IP of the current nginx server and pass it to the jumped page. There are multiple nginx servers used for diversion, so it is not easy to use hard coding
rewrite ^/(.*)$ http://xxx/a.php?id=/ permanent;
大家讲道理2017-05-16 17:19:40
It is recommended to pass the hostname, which nginx supports nginx_doc. Of course, the premise is that the hostname in the cluster is unique.
If you have to pass the IP, it’s not impossible, but it requires a little magic.