Welcome! Log In Create A New Profile

Advanced

Ускорение сайта

July 08, 2012 01:47PM
Сайт: http://aszh-kzn.ru/

Хостинг: RU-CENTER, тариф 201 http://hosting.nic.ru/

Сервер: nginx 1.2.0 + Apache + php 5.2.10

Тестирование: http://site-perf.com/cgi-bin/show.cgi?id=Y4z5tR_Bzzg

http://tools.pingdom.com/fpt/#!/M0MEZdKxh/aszh-kzn.ru/

nginx.conf.manual
-------------------------------------------------
##~#
worker_processes 1;
error_log /dev/null;
pid /var/run/nginx.pid;

events {
worker_connections 2048;
}

http {
set_real_ip_from 10.1.0.0/16;
set_real_ip_from 10.3.0.0/16;
set_real_ip_from 10.12.0.0/16;
set_real_ip_from 195.208.0.0/23;
real_ip_header X-Real-IP;

include /usr/local/etc/nginx/mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;

access_log off;

sendfile on;
keepalive_timeout 65;
include /etc/nginx/vhosts_list.conf;

gzip on;
gzip_min_length 1100;
#gzip_buffers 64 8k;
gzip_comp_level 6;
gzip_http_version 1.0;
gzip_proxied any;
gzip_types text/plain text/xml text/css application/xml application/x-javascript text/javascript text/json;
gzip_vary on;
}
-------------------------------------------------

aszh-kzn.ru.vhost.conf
-------------------------------------------------
server {
listen 10.1.47.59:80;
server_name aszh-kzn.ru www.aszh-kzn.ru;

location / {
proxy_pass http://10.1.47.59:8080;
proxy_redirect http://aszh-kzn.ru:8080/ /;
proxy_redirect http://www.aszh-kzn.ru:8080/ /;
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 192m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 64k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}

# 0

# Static files location
location ~* ^.+\.(jpg|jpeg|gif|swf|png|ico|mp3|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|dat|avi|ppt|txt|tar|mid|midi|wav|bmp|rtf|wmv|mpeg|mpg|mp4|m4a|spx|ogx|ogv|oga|webm|weba|ogg|tbz|js)$ {
root /home/sch20kzn/aszh-kzn.ru/docs/$subdomain;
expires max;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Cache-Control max-age=604800;
access_log /home/sch20kzn/aszh-kzn.ru/logs/access_log combined;
error_page 404 = @fallback;
log_not_found off;
# 1
accel_htaccess_switch on;
set $subdomain "";
if ($host ~* ^([a-z0-9-\.]+)\.aszh-kzn.ru$) {
set $subdomain "subdmn/$1";
}
if ($host ~* ^www.aszh-kzn.ru$) {
set $subdomain "";
}
}

location @fallback {
proxy_pass http://10.1.47.59:8080;
expires max;
add_header Cache-Control max-age=604800;
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 192m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 64k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}

# Error documents location
#location ^~ /errordocs {
# alias /home/sch20kzn/aszh-kzn.ru/errordocs;
#}
### rules if use subdmn in .htaccess ###
set $subdomain /home/sch20kzn/aszh-kzn.ru/docs;
if ($host ~* ^([\w-]+).aszh-kzn.ru$) {
set $subdomain "/home/sch20kzn/aszh-kzn.ru/docs/subdmn/$1";
}
if ($host ~* ^www.aszh-kzn.ru$) {
set $subdomain /home/sch20kzn/aszh-kzn.ru/docs;
}
# if directory "subdmn" exists - ok, change root
if ( -d "subdmn" ) {
set $root $subdomain;
}
}
-------------------------------------------------

Подскажите, пожалуйста, можно ли ускорить загрузку сайта? Ускорить загрузку статичных файлов: рисунки, стили, скрипты и т.д.?
Subject Author Posted

Ускорение сайта

lion2005 July 08, 2012 01:47PM

Re: Ускорение сайта

Андрей Василишин July 08, 2012 04:06PM

Re: Ускорение сайта

lion2005 July 08, 2012 04:11PM

Re: Ускорение сайта

Anton Kiryushkin July 08, 2012 04:12PM

Re: Ускорение сайта

Андрей Василишин July 08, 2012 04:16PM

Re: Ускорение сайта

Anton Kiryushkin July 08, 2012 04:56PM

Re: Ускорение сайта

Валентин Бартенев July 08, 2012 06:28PM

Re: Ускорение сайта

Валентин Бартенев July 08, 2012 06:52PM

Re: Ускорение сайта

Maxim Dounin July 08, 2012 07:04PM

Re: Ускорение сайта

Andrey Repin July 08, 2012 07:22PM

Re: Ускорение сайта

lion2005 July 08, 2012 06:03PM

Re: Ускорение сайта

Maxim Dounin July 08, 2012 07:28PM

Re: Ускорение сайта

lion2005 July 08, 2012 08:23PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 94
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready