Welcome! Log In Create A New Profile

Advanced

Always return IP when using nginx as LoadBalancer

Posted by kaufmaul 
Always return IP when using nginx as LoadBalancer
September 25, 2013 06:21AM
Dear Forum,

I have a VPS with static IP and no DNS-name, using it for load-balancing three web-sites. OS is Debian-6 with standard nginx 0.7.67.
It works pretty well, just sometimes nginx returns the hostname of the VPS, which is localhost.localdomain. This is ofcourse not very useful :)

It mostly happens when I do something like this:
12.34.56.78/site (contains the index.html)
and then manually change the adress in the browser to:
12.34.56.78/site/bin (contains perl scripts)

now nginx rewrites the address to localhost.localdomain/site/bin

Is there a command to make nginx always return the IP instead of local hostname, when acting as load balancer?
Or is this fixed in newer versions?

Thanks for any pointers to FAQs or other Threads.

Regards,
Ulrich
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready