ПРОЕКТЫ 


  АРХИВ 


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]

Оптимизация конфига


  • To: nginx-ru@xxxxxxxxx
  • Subject: Оптимизация конфига
  • From: Дмитрий Лялюев <dmitriy@xxxxxxxxxxxxx>
  • Date: Mon, 25 Feb 2013 15:14:07 +0200
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyalyuev.pp.ua; s=mail; h=x-received:mime-version:sender:x-originating-ip:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=f+zLV7gXeiCtQggaqbHIkOGsmZrLzv9ccuaMlaGNWFE=; b=j+iooWw782ppZ3s9AYxzAx8lB8aumuFI/NPLWzv/MSG15OMpAGz9vMx156SexriKx3 Z+DuFKswGW7c5c9gmXkeYUaVuILgGC/3j+OnjXhZDMdogKZ3mpzw+ES7J7lBjqzC9apu qnbxiqr/JAuFZY7PE+P6e7qEEm9Fh4YeMKfvQ=
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyalyuev.info; s=mail; h=x-received:mime-version:sender:x-originating-ip:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=f+zLV7gXeiCtQggaqbHIkOGsmZrLzv9ccuaMlaGNWFE=; b=jnLXHjSIV++5ynrm/SJ8hlw3H/2nKl/86PHOSrW2muDqkZOsvvOMNAgtDDIYg9EdjM 6d0vCbozXBMBNisSnVgYxMQk0YExvSE+rJYhonwMnpD+djadZVmzCI7eNyNnWUiWjmBm n9QxhLK2iU0yOCh8wBncBcx6zkEp0IVlI+jjM=

Есть написанный мной конфиг. Хотелось бы выслушать предложения по его оптимизации и ругань, что я ламер и надо делать все не так. :) Поможете?

server {
    listen       80 default;
    server_name  ~^(?:www\.)*(?<HBW>.+)$;
    server_name_in_redirect  off;

    access_log off;
    error_log /var/log/nginx/proxy.log;

    root /var/www/apps/application/current/public;

    include /etc/nginx/banned_ip.conf;

    location / {
        try_files /maintenance.html $uri @apache;

        location ~ ^(/Help|/pub) {
            proxy_pass        http://wiki.application.com;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        location ~ /(assets|images/egg/sites) {
            expires modified +30d;
            access_log off;
            try_files /maintenance.html $uri @apache;
        }

        location ~ ^/stylesheets/(.*)/(.*) {
            rewrite /stylesheets/(.*) /assets/$1 last;
        }

        location ~ ^/(images|_javascript_s) {
            rewrite /(images|_javascript_s)/(.*) /assets/$2 last;
        }

        location ~* \.(gif|jpg|png|ico)$ {
            root /var/www/apps/application/current/eggs/$HBW;
            access_log off;
            expires modified +30d;
            error_page 404 @apache;
        }
    }

    location /crossdomain.xml$ {
        root /var/www/crossdomains/$HBW;
    }

    location @apache {
        proxy_pass         http://localhost:8080;
        include /etc/nginx/proxy.conf;
    }
}

Спасибо заранее. :)

--
С уважением,
Дмитрий Лялюев
тел. +380 (66) 532-29-62
Все контакты для связи на http://lyalyuev.info
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.