HTTP/1.x 405 Method Not Allowed

Name Last name deepmindster at gmail.com
Thu Apr 10 18:10:51 MSD 2008


Здравствуйте все,
спасибо всем за ответы.

Дмитрий, Вы правы. Как и Максим.
У меня в конфиге примерно так, как вы предполагаете
Только до конца не ясно, что с этим делать, то есть что имеется ввиду под
прописать явно?
Добавления фрагментов ниже в конфиг не дал эффекта, то есть метод всё ещё
Not Allowed.
Максим, отдельное спасибо за ключевые слова, просматриваю рассылку с помощью
гугла. Но пока, к сожалению, результата нет.

location = /new_site/content/public_html/user/save-bling {
            fastcgi_pass   127.0.0.1:1026;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /srv/www/vhosts/
mysite.com/new_site/content/public_html/index.php?part=User&subPart=Main&page=SaveBling
;
            include etc/nginx/fastcgi_params;
        }


Конфиг ниже

$ cat etc/nginx/fastcgi_params:

           fastcgi_param  QUERY_STRING     $query_string;
            fastcgi_param  REQUEST_METHOD   $request_method;
            fastcgi_param  CONTENT_TYPE     $content_type;
            fastcgi_param  CONTENT_LENGTH   $content_length;


$ cat mysite.com.conf

   server {

        listen  111.11.111.111:80;
        server_name  mysite.com www.mysite.com;

        root    /srv/www/vhosts/mysite.com;
        index   index.php index.html;

        access_log /var/log/nginx/mysite.com.access.log  main;
        error_page 404 403 500 501 502 503 504 /404.php;

        location = /new_site/ {
            fastcgi_pass   127.0.0.1:1026;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME
/srv/www/vhosts/mysite.com$fastcgi_script_name;
            include etc/nginx/fastcgi_params;
        }

        location ^~ /new_site/.+\.(png|jpg|jpeg|gif|htc|ico|css|js)$ {
            root /srv/www/vhosts/mysite.com <http://blingeasy.com>;
            expires 3h;
        }

        location ~ /new_site/[^.]+\.php$ {
            fastcgi_pass   127.0.0.1:1026;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME
/srv/www/vhosts/mysite.com$fastcgi_script_name;
            include etc/nginx/fastcgi_params;
        }

        location ~ /new_site/.+$ {
            rewrite ^/new_site/content/public_html/flashconfig$
/new_site/content/public_html/index.php?part=Flash&subPart=Main&page=Config
last;
#            rewrite ^/new_site/content/public_html/user/save-bling$
/new_site/content/public_html/index.php?part=User&subPart=Main&page=SaveBling
last;
        }

        location ~ \.php$ {
            proxy_pass         http://127.0.0.1:80;
            proxy_redirect     off;

            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;

            client_max_body_size       10m;
            client_body_buffer_size    128k;

            proxy_connect_timeout      90;
            proxy_send_timeout         90;
            proxy_read_timeout         3000;

            proxy_buffer_size          4k;
            proxy_buffers              4 32k;
            proxy_busy_buffers_size    64k;
            proxy_temp_file_write_size 64k;

        }

        location ^~ \.(png|jpg|jpeg|gif|htc|ico|css|js)$ {
            expires 1y;
        }

        location ~ /\.ht {
            deny all;
        }

        location ~ config\.xml$ {
            deny  all;
        }
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20080410/30556786/attachment.html>


More information about the nginx-ru mailing list