Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
настройка nginx+apache - httpd-vhosts
- To: nginx-ru@xxxxxxxxx
- Subject: настройка nginx+apache - httpd-vhosts
- From: "GigA" <nginx-forum@xxxxxxxx>
- Date: Sun, 10 Jul 2011 18:24:35 -0400
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=KWWF6+kAc/BatGKauyaa7/qv+/q+0w9oqaEKRS9h440=; b=rMpwDg5LMupgR8jkoY4WLtbqzg3BKbOyrP5CaE6eukKztO63wpEwnItzeOohCg8i2veOmxtamm0fKLMX+kQelGagaEyGVGUvUjHmrQPc4TGaHYtwOpbgUPvlPZsSVXsk;
Решил поставить Nginx->Apache, nginx является
frontend'ом, а apache соответственно backend'ом.
Возникла проблема при загрузке
картинок т.е. директория сайтов
находиться C://www/ сайтов около 5 штук
при заходе на сайт под доменом forum.domen.ru
Nginx пытается загрузить картинки с
адреса C://www/images
А должен загружать C://www/forum/images
Помогите решить проблему.
Мои настройки
настройки httpd-vhosts
<VirtualHost *:88>
ServerName forum.domen.ru
DocumentRoot "C:/www/Forum"
ErrorLog "C:/www/Forum/admin/erorr.log"
</VirtualHost>
и т.д.
Настройки Nginx
worker_processes 2;
error_log C:/nginx/logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
events {
worker_connections 2000;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local]
"$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
keepalive_timeout 2m;
#gzip on;
server {
listen 80;
server_name _;
#access_log logs/host.access.log main;
location ~*
\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|js)$ {
root C:/www;
access_log off;
expires 30d;
}
location ~ /\.ht {
deny all;
}
location / {
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;
client_max_body_size 10m;
client_body_buffer_size 128k;
#client_body_temp_path tmp/client_body_temp;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
#proxy_temp_path tmp/proxy_temp;
charset koi8-r;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,212053,212053#msg-212053
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|