Reason for 405 error on POST

Chris Savery chrissavery at
Sat Aug 23 12:50:08 MSD 2008

I tracked this down and found out it was indeed only when a post to a 
static file was happening.
I have some code which caches script output by creating static files of 
some content. It shouldn't have been doing it for POST situations but it 
was sometimes. Once that was fixed I didn't get this problem again. It 
was helpful to know how the 405 originated.
Chris :)

Igor Sysoev wrote:
> On Fri, Aug 22, 2008 at 10:53:25PM +0700, Chris Savery wrote:
>> Having a problem with a 405 response for something that has often worked 
>> before.
>> url is like:  condor?cmd=Fbs,601&stars=1
>> and post data is: comment=xxxx
>> or sometimes no post data if comment not type in.
>> I see that content length is set in header going out.
>> But keep getting 405 back except the odd time for some reason I get a 
>> 200 OK.
>> Anyone have any ideas? I have other parts of my code where POST works ok 
>> with the same php handler. Note above is has no php extension because I 
>> have a rewrite that adds it for the backend. That has been working fine 
>> in all other cases.
> nginx usually returns 405 for POST to static files.
> Could you show example line from access log ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list