atom feed9 messages in ru.sysoev.nginxRe: Connection reset by server
FromSent OnAttachments
Adam SetzlerAug 22, 2008 10:08 pm 
Adam SetzlerAug 23, 2008 7:43 am 
RoxisAug 23, 2008 7:55 am 
Adam SetzlerAug 23, 2008 9:03 am 
Adam SetzlerAug 23, 2008 9:07 am 
mikeAug 23, 2008 9:43 am 
Adam SetzlerAug 23, 2008 11:55 am 
Adam SetzlerAug 23, 2008 11:57 am 
RoxisAug 23, 2008 12:21 pm 
Subject:Re: Connection reset by server
From:Roxis (roxi@public.gmane.org)
Date:Aug 23, 2008 12:21:23 pm
List:ru.sysoev.nginx

On Saturday 23 August 2008, Adam Setzler wrote:

I figured it out... Here's what was happening.

I was setting the expiration of certain file extensions to 30 days with:

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ { access_log off; expires 30d; }

So, when the AJAX function was posting to upload/js, Nginx thought it was a static file, so Nginx threw a 405 Not Allowed. Why? Because I failed to escape the "." (any character) before js, so upload/js was the same as upload.js.

Correct regexp:

location ~* ^.+*\*.(jpg|jpeg|gif|css|png|js|ico)$ { access_log off; expires 30d; }

does not look like correct one but this one is:

location ~* \.(jpg|jpeg|gif|css|png|js|ico)$