0

On a Guruplug (ARM) running Squeeze (upgraded from Lenny) I have an odd issue I never came along before.

Requesting a directory without trailing slash rewrites the url to the default server_name

This is my server_name:

server_name 10.10.10.1 192.168.*.* sheeva.domain.tld sheeva localhost;

Whenever I access 192.168.1.15/mrtg I get redirected to 10.10.10.1/mrtg/ which, depending on the interface, doesn't always work out as it should be (IP being unaccessible).

$ wget http://192.168.1.15/mrtg -O /dev/null 
--2011-02-09 22:17:51--  http://192.168.1.15/mrtg
Connecting to 192.168.1.15:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://10.10.10.1/mrtg/ [following]
--2011-02-09 22:17:51--  http://10.10.10.1/mrtg/
Connecting to 10.10.10.1:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3742 (3.7K) [text/html]
Saving to: `/dev/null'

I don't seem to have this issue on other nginx servers. I've checked config files for differences but can't find any.

# nginx -v
nginx version: nginx/0.7.67

Thanks

1 Answer 1

1

Sounds like you need to set server_name_in_redirect to off.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .