Re: Проксирование PUT и DELETE

Монашёв Михаил postmaster at softsearch.ru
Tue Dec 2 18:16:58 MSK 2008


Здравствуйте, Игорь.

>> не сработало. nginx отвечает 405 Not Allowed на PUT и DELETE

> break'и стоят ?

Да, стоят. Вот конфиг:

timer_resolution 100ms;

#user  nobody;
worker_processes  1000;

error_log       /opt/log/nginx/error.log;

pid             /var/run/nginx.pid;

events {
        use kqueue;
        #worker_connections  16385;
}


http {

        log_format main '$time_local $status "$upstream_status" "$upstream_response_time" "$upstream_addr" $remote_addr $bytes_sent $host "$request" "$http_referer" "$http_user_agent"';
        access_log     off;

        log_not_found           off;

        sendfile                on;
        tcp_nopush              on;
        tcp_nodelay             on;
        send_lowat              12000;

        ignore_invalid_headers on;
        server_names_hash_bucket_size 64;

        client_body_temp_path   /var/tmp/nginx/client_body_temp_path;

        client_max_body_size    10m;
        client_body_buffer_size 128k;

        client_header_timeout           3m;
        client_header_buffer_size       2k;
        client_body_timeout                     3m;
        send_timeout                            3m;
        postpone_output                         1460;
        keepalive_timeout                       75 60;

        reset_timedout_connection       on;

        proxy_set_header        Host                                    $host;

        proxy_set_header        X-Real-IP                               $remote_addr;

        proxy_redirect  off;

        proxy_buffers   128     128k;

        proxy_temp_path /var/tmp/nginx/proxy_temp_path;

        server {
                listen          89.208.146.215:80 default accept_filter=httpready;
                server_name     i0.beon.ru i1.beon.ru i2.beon.ru i3.beon.ru i4.beon.ru i5.beon.ru i6.beon.ru i7.beon.ru i8.beon.ru i9.beon.ru i10.beon.ru i11.beon.ru i12.beon.ru i13.beon.ru i14.beon.ru i15.beon.ru i16.beon.ru i17.beon.ru i18.beon.ru i19.beon.ru i20.beon.ru i21.beon.ru i22.beon.ru i23.beon.ru i24.beon.ru i25.beon.ru i26.beon.ru i27.beon.ru i28.beon.ru i29.beon.ru i30.beon.ru i31.beon.ru i32.beon.ru ;

                expires         1y;

                location / {
                        client_body_temp_path   /opt1/tmp;
                        proxy_intercept_errors off;
                        #dav_methods    PUT DELETE;
                        if ($request_method = PUT ) {
                                break;
                                proxy_pass              http://83.222.14.150:80;
                        }
                        if ($request_method = DELETE ) {
                                break;
                                proxy_pass              http://83.222.14.150:80;
                        }

                        limit_except GET {
                                allow   10.0.0.0/8;
                                deny    all;
                        }

                        root    /opt1/$host/;
                        error_page      404 = @fetch;
                }

                location @fetch {
                        internal;

                        proxy_pass              http://83.222.14.150:80;
                        proxy_store             /opt1/$host/$request_uri;
                        proxy_store_access      user:rw  group:rw  all:r;
                        proxy_temp_path         /opt1/temp;
                }
        }
}
        
-- 
С уважением,
Монашёв Михаил, SoftSearch.ru
mailto:postmaster at softsearch.ru
ICQ# 166233339
http://michael.mindmix.ru/
Без бэкапа по жизни.






More information about the nginx-ru mailing list