Ajax POST error 405

Ferenc-lorant Kiss lists at ruby-forum.com
Tue Nov 20 11:16:25 MSK 2007

Ijust installed ngnix on my server. All rail applications works perfect,
but i have some static sites where i use AJAX for content replacement
and i get 405 Not allowed error.
Server config:
  server {
    listen       80;
    server_name  www.clean-tech.ro clean-tech.ro ;

    access_log /srv/www/vhosts/clean-tech/www/log/nginx.log main;

    location / {
      root /srv/www/vhosts/clean-tech/www;
      index  index.html index.htm;
    #error_page  404              /404.html;

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
      root   /srv/www/htdocs/;

I tried
    error_page   405   = @405;
    location = @405 {
         root   /srv/www/vhosts/clean-tech/www;
 but after this workaround i get error 500

Host  clean-tech.ro
User-Agent  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:
Gecko/20071101 SUSE/ Firefox/
Accept  text/javascript, text/html, application/xml, text/xml, */*
Accept-Language  en-us,en;q=0.5
Accept-Encoding  gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive  300
Connection  close
X-Requested-With  XMLHttpRequest
X-Prototype-Version  1.5.0_rc1
Content-Type  application/x-www-form-urlencoded
Referer  http://clean-tech.ro/
Content-Length  0
__utmb=240299857; __utmc=240299857
Pragma  no-cache
Cache-Control  no-cache
Posted via http://www.ruby-forum.com/.

More information about the nginx mailing list