5 messages in ru.sysoev.nginxRe: Redirecting from mysite.com to ww...
FromSent OnAttachments
ThomasSep 18, 2008 11:47 am 
Juan Fco. GiordanaSep 18, 2008 12:44 pm 
ThomasSep 18, 2008 1:41 pm 
ThomasSep 18, 2008 1:49 pm 
Jean-Philippe MoalSep 22, 2008 1:09 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Redirecting from mysite.com to www.mysite.comActions...
From:Juan Fco. Giordana (juan@gmail.com)
Date:Sep 18, 2008 12:44:05 pm
List:ru.sysoev.nginx

Do you have this server block also defined?

server { server_name www.mysite.com; ^^^^ }

You're probably falling on an infinite loop.

Thomas wrote:

On my local dev machine, here is my /etc/hosts file:

--- 127.0.0.1 localhost mysite.com www.mysite.com

---

And in my Nginx config file I have:

--- server { server_name mysite.com; rewrite ^/(.*) http://www.mysite.com/$1 permanent; }

---

But when I want to access mysite.com or www.mysite.com I get the following error message:

What could possibly go wrong?