ðòïåëôù 


  áòèé÷ 


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: ÏÐÁÚÄÙ×ÁÎÉÅ Ó ×ÏÚ×ÒÁÝÅÎ ÉÅÍ ÏÂÎÏ×ÌÅÎÉÊ css/javascript Æ ÁÊÌÏ×



îÕÖÎÏ ÓÎÁÞÁÌÁ ×ÌÉÔØ ÆÁÊÌ ÐÏÄ ÄÒÕÇÉÍ ÉÍÅÎÅÍ, Á ÐÏÔÏÍ ÐÅÒÅÉÍÅÎÏ×ÁÔØ × ÎÕÖÎÏÅ.
ô.Î. ÁÔÏÍÁÒÎÏÅ ÏÂÎÏ×ÌÅÎÉÅ.

2011/9/13 locojohn <nginx-forum@xxxxxxxx>
ðÒÉ×ÅÔ!

ðÒÏÂÌÅÍÁ ÓÌÅÄÕÀÝÁÑ, ËÏÔÏÒÁÑ ×ÏÚÎÉËÁÅÔ
ÐÅÒÉÏÄÉÞÅÓËÉ, ÂÅÚ ÏÞÅ×ÉÄÎÏÊ Ó×ÑÚÉ. ñ
ÏÂÎÏ×ÌÑÀ ÓÔÁÔÉÞÅÓËÉÊ CSS ÉÌÉ JS ÆÁÊÌ ÐÏ FTP.
äÅÌÁÀ ÒÅÆÒÅÛ × ÂÒÁÕÚÅÒÅ. âÒÁÕÚÅÒ "ÎÅ
×ÉÄÉÔ" ÏÂÎÏ×ÌÅÎÉÑ, ÐÏÔÏÍÕ ÞÔÏ ÓÅÒ×ÅÒ
×ÏÚ×ÒÁÝÁÅÔ 304 Not Modified. þÅÒÅÚ ÎÅËÏÔÏÒÏÅ
×ÒÅÍÑ (ÏÔ ÓÅËÕÎÄÙ ÄÏ ÍÉÎÕÔÙ É ÄÁÖÅ
ÂÏÌØÛÅ), ÐÏÓÌÅ ÎÅÓËÏÌØËÉÈ ÒÅÆÒÅÛÅ×,
ÎÁËÏÎÅà ×ÏÚ×ÒÁÝÁÅÔÓÑ 200 OK É ËÏÄ
ÏÂÎÏ×ÌÑÅÔÓÑ. šéÓÐÏÌØÚÏ×ÁÌÉÓØ ÂÒÁÕÚÅÒÙ:
Safari 5.1 (Mac OS X), Firefox 6.0.2 (Win 7), Chrome 13.0.782.220 m (Win
7)

ðÒÏÂÏ×ÁÌ ×ÙÎÏÓÉÔØ css/_javascript_ ÉÚ gzip_types, ÎÏ
ÜÔÏ ÎÅ ÉÚÍÅÎÉÌÏ ÓÉÔÕÁÃÉÉ. šïÔËÁÔÙ×ÁÌÓÑ
ÎÁ nginx/1.0.5, ÎÏ ÜÔÏ ÎÅ ÐÏÍÏÇÌÏ. š÷ ÏÂÝÅÍ,
ÏÂÎÏ×ÌÅÎÉÑ ×ÉÄÑÔÓÑ ÞÅÒÅÚ ËÁËÏÅ-ÔÏ
ÎÅÏÐÒÅÄÅÌ£ÎÎÏÅ ×ÒÅÍÑ, ÎÏ ÎÅ ÓÒÁÚÕ.

äÏÒÏÇÉÅ ËÏÌÌÅÇÉ, Ó ÞÅÍ ÜÔÏ ÍÏÖÅÔ ÂÙÔØ
Ó×ÑÚÁÎÏ É ËÁË ÒÅÛÉÔØ ÄÁÎÎÕÀ ÐÒÏÂÌÅÍÕ?

nginx -V :

nginx: nginx version: nginx/1.1.2
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/usr --sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid
--lock-path=/var/lock/nginx.lock --user=nginx --group=nginx
--with-cc-opt=-I/usr/include --with-ld-opt=-L/usr/lib
--http-log-path=/var/log/nginx/access_log
--http-client-body-temp-path=/var/tmp/nginx/client
--http-proxy-temp-path=/var/tmp/nginx/proxy
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi
--http-scgi-temp-path=/var/tmp/nginx/scgi
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --with-file-aio
--with-aio_module --with-pcre --without-http_auth_basic_module
--without-http_geo_module --without-http_limit_req_module
--without-http_limit_zone_module --without-http_memcached_module
--without-http_referer_module --without-http_scgi_module
--without-http_ssi_module --without-http_split_clients_module
--without-http_userid_module --without-http_uwsgi_module
--with-http_flv_module --with-http_geoip_module
--with-http_stub_status_module --with-http_realip_module
--add-module=/var/tmp/portage/www-servers/nginx-1.1.2/work/masterzen-nginx-upload-progress-module-8b55a34
--with-http_ssl_module --without-mail_imap_module
--without-mail_pop3_module --without-mail_smtp_module

nginx.conf:

user www www;
worker_processes 2;
worker_rlimit_nofile 10000;
#worker_cpu_affinity 0001 0010 0100 1000;

error_log /var/log/nginx/error_log warn;

events {
š š š šworker_connections 128;
š š š šuse epoll;
# š š š debug_connection 217.24.65.183;
}

http {
š š š šinclude /etc/nginx/mime.types;
š š š šdefault_type application/octet-stream;

š š š šlog_format main
š š š š š š š š'$remote_addr - $remote_user [$time_local] '
š š š š š š š š'"$request" $status $bytes_sent '
š š š š š š š š'"$http_referer" "$http_user_agent" '
š š š š š š š š'"$gzip_ratio" $request_time';

š š š šclient_header_timeout 10m;
š š š šclient_body_timeout 10m;
š š š šsend_timeout 10m;

š š š šclient_max_body_size 700m;
š š š šconnection_pool_size 256;
š š š šclient_body_buffer_size 1024k;
š š š šclient_header_buffer_size 8k;
š š š šlarge_client_header_buffers 4 8k;
š š š šrequest_pool_size 4k;

š š š šproxy_buffering on;
š š š šproxy_buffer_size 4k;
š š š proxy_buffers 4096 4k;

š š š šopen_file_cache max=2000 inactive=60s;
š š š šopen_file_cache_valid 60;
š š š šopen_log_file_cache max=1000 inactive=60s valid=1m;

š š š šgeoip_country /usr/share/GeoIP/GeoIP.dat; # the country IP
database
š š š šgeoip_city š š/usr/share/GeoIP/GeoLiteCity.dat; # the city IP
database

š š š šgzip on;
š š š šgzip_min_length 1100;
š š š šgzip_buffers 4 8k;
š š š šgzip_types text/plain text/css application/x-_javascript_ text/xml
application/xml application/xml+rss text/_javascript_;

š š š šoutput_buffers 1 32k;
š š š špostpone_output 1460;

š š š šaio on;
š š š šdirectio 512;
š š š šsendfile on;
š š š štcp_nopush on;
š š š štcp_nodelay on;

š š š škeepalive_timeout 75 20;
š š š škeepalive_disable msie6;

š š š šignore_invalid_headers on;
š š š šserver_name_in_redirect on;

š š š šfastcgi_pass_request_headers on;
š š š šfastcgi_intercept_errors on;
š š š šfastcgi_buffer_size 4k;
š š š šfastcgi_buffers 1024 4k;
š š š šfastcgi_read_timeout 300;
š š š fastcgi_send_timeout 300;

š š š šindex index.html;

š š š šupstream phpfarm {
š š š š šserver unix:/var/run/fastcgi/php-fpm-1.sock weight=100
max_fails=3 fai
š š š š šserver unix:/var/run/fastcgi/php-fpm-2.sock weight=100
max_fails=3 fai
š š š š šserver unix:/var/run/fastcgi/php-fpm-3.sock weight=100
max_fails=3 fai
š š š š}

š š š š# upload progress
š š š šupload_progress uploads 1m;
š š š šupload_progress_content_type "application/json";
š š š šupload_progress_json_output;

# virtual host configuration

š š š # devel.testsite
š š š šserver {
š š š š š š š šlisten 80;
š š š š š š š šserver_name devel.testsite;
š š š š š š š šclient_max_body_size 1000m;

š š š š š š š šaccess_log /var/log/nginx/testsite.access_log main;
š š š š š š š šerror_log /var/log/nginx/testsite.error_log warn;

š š š š š š š šroot /opt/www/testsite;

š š š š š š š šlocation / {
š š š š š š š š šindex index.php;
š š š š š š š š}

š š š š š š š š# include common settings
š š š š š š š šinclude common.conf;

š š š š š š š šcharset utf-8;

š š š š š š š šlocation /data {
š š š š š š š š šdeny all;
š š š š š š š š}

š š š š š š š šlocation = /uploads/progress {
š š š š š š š š šreport_uploads uploads;
š š š š š š š š}

š š š š š š š š# glue css/js files into a single file for faster
loading
š š š š š š š šrewrite .*/(css|_javascript_)/[^,]+,.+ /glue.php last;

š š š š š š š šlocation ~ ^(?<script_filename>.+\.php)$ {
š š š š š š š š štry_files $script_filename =404;
š š š š š š š š šinclude fastcgi_params;
š š š š š š š š šfastcgi_param SCRIPT_FILENAME
$document_root$script_filename;
š š š š š š š š šfastcgi_pass phpfarm;
š š š š š š š š štrack_uploads uploads 30s;
š š š š š š š š}
š š š š}

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

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

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


 




Copyright © Lexa Software, 1996-2009.