Connection reset by server
Adam Setzler
adam.setzler at gmail.com
Sat Aug 23 22:56:16 MSD 2008
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;
}
Thanks for the insight, everyone.
-- Adam
"Courage is not the absence of fear, but rather the judgment that something
else is more important than fear." — Ambrose Redmoon
On Sat, Aug 23, 2008 at 11:44 AM, mike <mike503 at gmail.com> wrote:
> no, that's a required HTML enctype in the <form> tag to be able to
> submit file uploads. it'd probably help if you included the version of
> nginx you're using.
>
> i host a drupal site currently and there's been no complaints (not
> sure if they're using file uploads though) using nginx 0.7.8 (i need
> to upgrade too)
>
>
> On 8/23/08, Adam Setzler <adam.setzler at gmail.com> wrote:
> > I just found this in the Drupal upload module...
> >
> > $form['#attributes']['enctype'] = 'multipart/form-data';
> >
> > Does this mean I need to have the Nginx Upload mod installed?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080823/edf14a2a/attachment.html>
More information about the nginx
mailing list