As it turns out, the issue was a missing document root (since I
previously only used that server section to redirect to www) Added the
root and it worked fine.
As for the variable in the location, I did not write that. It was
suggested to me in the thread:
On 19/09/2012 3:21 AM, Valentin V. Bartenev wrote:
}
location /blogs {
...
location ~ ^/blogs/([^/]+) {
...
}
}
The suggested config of adding a variable is over complicated and very
little Nginxy. That’s seems like a throwback to Apache’s style IMO.
Valentin’s suggestion with blogname being a capture in a regex based
(nested) location is a much cleaner way. It’s also informative in the
way Nginx configuration language works. It’s mostly declarative.
Try it out.
— appa
As it turns out, the issue was a missing document root (since I
previously only used that server section to redirect to www) Added the
root and it worked fine.
As for the variable in the location, I did not write that. It was
suggested to me in the thread: