Re: Переброс 404 ошибок на apache backend
alexam
nginx-forum на nginx.us
Вт Фев 15 13:38:38 MSK 2011
Пасиб за попытку помочь,
я как то не так реализовал ?
/etc/init.d/nginx start
Starting nginx: [emerg]: "proxy_pass" may not have URI part in location
given by regular expression, or inside named location, or inside the
"if" statement, or inside the "limit_except" block in
/etc/nginx/sites-enabled/qqq.qqq.pro.conf:11
nginx.
[code]
server {
listen 192.168.1.7:80;
server_name QQ.QQ.pro www.QQ.QQ.pro;
location / {
try_files $uri $uri/ @apache;
}
location @apache {
proxy_pass http://192.168.1.7: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_body_buffer_size 32k;
proxy_connect_timeout 10;
proxy_send_timeout 30;
proxy_read_timeout 30;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_temp_path /tmp;
}
location ~*
\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|
ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mov)$
{
root /home/conv2/public_html;
expires 30d;
}
location ~ /\. {
deny all;
}
}
[/code]
Posted at Nginx Forum: http://forum.nginx.org/read.php?21,174843,175355#msg-175355
Подробная информация о списке рассылки nginx-ru