ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Загрузка картинок фронт эндом nginx



Пожалуйста:

server {
        listen *:80;
                
        error_page  403 404  = @fallback;
        location  @fallback {
                proxy_pass http://127.0.0.1:81;
                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;
        }       
                
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /etc/nginx/html;
        }
                
        location / {
                log_not_found off;
                limit_req   zone=one  burst=10;
                client_max_body_size 16m;
                client_body_buffer_size 128k;
                proxy_pass http://127.0.0.1:81/;
                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;
                proxy_connect_timeout 90;
                proxy_send_timeout    90;
                proxy_read_timeout    90;
                proxy_buffer_size          4k;
                proxy_buffers              8 64k;
                proxy_busy_buffers_size    64k;
                proxy_temp_file_write_size 64k;
                proxy_temp_path            /var/tmp/nginx;
                limit_except  POST GET {
                        allow  92.181.34.42/32;
                        deny   all;
                }
        }
        location ~ /\.ht {
            deny  all;
        }

        location  ~*
\.(gif|jpg|jpeg|png|bmp|ico|js|css|txt|html|htm|xml|swf|flv)$ {
                #root /var/www/servername1;
                #expires 30d;
        }
        location  ~* \.(mp3|wmv|avi|mpg|mpeg|mov|doc|pdf|rtf|xls|zip|rar)$ {
                #root /var/www/servername1;
                #expires 30d;
        }
}

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,209587,210807#msg-210807


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.