I think I need "location ~* ^/.+" instead of "location /" because I have this: location / { index index.html; } so www.example.com will read /index.html, while in the case of "location /", it can't find / in mapping, then return 404. Am I right? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,213431,213435#msg-213435