Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon May 04, 2009 3:29 pm 
Offline
Senior Newbie

Joined: Sat Apr 04, 2009 7:51 pm
Posts: 12
Fairly new to nginx, does anyone know why this happens?

http://xxx.xxx.xxx.xxx/folder/ - opens fine
http://xxx.xxx.xxx.xxx/folder - redirects to: http://www.li46-80.com/folder/


Top
   
 Post subject:
PostPosted: Mon May 04, 2009 4:46 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Usually, web servers will redirect from http://blah/directoryname to http://hostname/directoryname/ for various reasons. Odds are good that it thinks your hostname is li46-80, so it's really redirecting you to http://li46-80/folder/ and your browser is sticking the www and com on it because it can't resolve li46-80.

It's probably getting that from the system hostname, which is probably set from the reverse DNS for your IP. In Apache, ensuring ServerName is set correctly is the way to go; nginx probably has a similar setting. I bet that will fix it :-)


Top
   
 Post subject:
PostPosted: Mon May 04, 2009 4:55 pm 
Offline
Senior Member

Joined: Mon Jun 16, 2008 6:33 pm
Posts: 151
Either you have an error in your rewrite rules, or you may've fallen victim to this peculiarity of Nginx.

Incidentally, it's a normal slash.

EDIT: Aargh, too slow :) And in hindsight, hoopycat is probably right.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group