Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Скорость загрузки на nginx ниже чем на Apache?
В самом первом сообщении написал его. Повторюсь
> Конфиг nginx-а ещё не помешал бы.
>
Вот ниже конфиг, я его где-то скачал попробовать - вряд ли он что нибудь
дельное скажет. единственное - это часть лога, всего конструкций
server {} около 300-500, но они все не активны (дохлые домены)
>>>>>>>>>>>>>>>>>>>>
user apache apache;
worker_processes 2;
#worker_rlimit_nofile 150000;
error_log /var/log/nginx/error_log;
pid /var/run/nginx.pid;
events {
worker_connections 8192;
}
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"';
#for bandwith, 69 - ot baldy, dont know how calculate received bytes
log_format bytes '$bytes_sent 69';
access_log /var/log/nginx/access.log main;
#limit_zone one $binary_remote_addr 10m;
#limit_conn one 7;
#limit_rate 512K;
#limit_zone cglob $binary_remote_addr 16m;
client_header_timeout 60;
client_body_timeout 60;
send_timeout 120;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_send_timeout 180;
# msie_padding on;
proxy_buffer_size 32K;
proxy_buffers 64 512K;
proxy_busy_buffers_size 1024K;
proxy_temp_file_write_size 1024K;
gzip on;
gzip_min_length 10240;
gzip_buffers 32 64k;
gzip_types application/x-javascript text/css text/xml text/plain;
client_header_buffer_size 4K;
client_max_body_size 10M;
large_client_header_buffers 16 8K;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
output_buffers 32 256k;
postpone_output 1460;
lingering_time 30;
lingering_timeout 6;
reset_timedout_connection on;
keepalive_timeout 20;
server_names_hash_bucket_size 10240;
server {
listen 1.1.1.1:81;
server_name popa.ru;
# access_log /var/log/httpd/domains/popa.ru.log main;
error_log /var/log/httpd/domains/popa.ru.error.log error;
location / {
proxy_pass http://1.1.1.1;
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 60;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 120 64k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
location @back {
proxy_pass http://1.1.1.1;
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;
}
#Static files location
location ~*
^.+\.(jpg|jpeg|gif|mp3|png|avi|vob|mpg|mpeg|mp4|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$
{
root /home/popat/domains/popa.ru/public_html;
expires 14d;
error_page 404 = @back;
access_log /var/log/httpd/domains/popa.ru.log main;
access_log /var/log/httpd/domains/popa.ru.bytes bytes;
}
}
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|