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: "webcoderu" <nginx-forum@xxxxxxxx>
- Date: Mon, 10 Jan 2011 13:32:00 -0500
- 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=KCPfKi4H7LJNgc9+vPHkm4Gvms1D0IvO4scxKb2Ubd4=; b=bOVrhhk5jSlTIr5iGG/cu7AWbzmdm8ZW+Q8t88cO5Z52Bv94epEaPGjhXN8WWSyTx+0p8z8OGBteEtRaAarnE0+6Q5+6dJ4IzXRm39qPhRthMGmoXhHEC4qltBZS6rOp;
Здравствуйте!
У меня проблема, не понимаю в чём
ошибка.
[b]Основной конфиг nginx:[/b]
[code]
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
gzip_comp_level 3;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript;
include /etc/nginx/sites-enabled/*;
}
[/code]
[b]Конфиг хоста:[/b]
[code]
upstream backend {
server ---.---.---.---:8080;
}
server {
listen 80;
server_name vmuzike.net www.vmuzike.net;
access_log .../statistics/logs/nginx_access_log;
error_log .../statistics/logs/nginx_error_log;
location / {
proxy_pass http://backend;
include /etc/nginx/proxy.conf;
}
location ^~ /files/ {
root .../subdomains/files/httpdocs;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|txt|xml)$ {
expires max;
log_not_found off;
root .../httpdocs;
}
}
[/code]
[b]Содержимое файла /etc/nginx/proxy.conf[/b]
[code]
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 15m;
client_body_buffer_size 128k;
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;
[/code]
Проблема в том что при запросе
http://.../files/folder/file.mp3 должен сработать
location ^~ /files, но почему то не срабатывает.
Подскажите пожалуйста, что не так и в
чём проблема?
Заранее спасибо!
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,165175,165175#msg-165175
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|