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: Anton Bessonov <exelib@xxxxxxxxxxxxxx>
- Date: Thu, 29 Jul 2010 17:11:31 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=rG2WesWJzgiJvshXXFpeCRqkSmrHbwc8Bx+z3Sd2H9A=; b=K9QLb0A532fClBpIz1TQVDoL8/KmpLaFHhgZZtOsJF14SumX++6dto+QUZHsIGBTBv EN3RchN9ruMK7hEJpWOEXN1hio3OTGICMqG+5IPLm0HamgQvQFm4RDP0+AQTey761NQO j7dF4CdBkg9z/xZ45Suv1fiZoAz8HxllIWJWs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=FnCsRKmg9vBioptkVaXKyWlJuVF7t9PPQ+rcRDqmOYaZTHGFezT4jZuD5AUB+7MjOq W/P94YnsMX35T4gjFoK9UplJeasBMhCPhVv3TQ1lA2EXupe6HdHMJui2nQxZhHVteZf5 HmfQE8m0HEOJ5xjnfVwF/8kpfyd0fIB1FbeCs=
Захотелось (вернее пришлось) вынести часть под отдельного юзера.
Первый энджин:
server {
listen 80;
server_name host.ru;
error_log /tmp/error.log;
location ~* ^.+.(html|gif|jpg|png|css|zip|rar|exe|com|ico)$ {
expires 30d;
proxy_buffering off;
proxy_pass http://127.0.0.1:8049;
}
location / {
[...]
Второй энджин:
user myuser;
worker_processes 4;
error_log /tmp/error2.log;
pid /var/run/nginx_myuser.pid;
events {
worker_connections 1024;
}
http {
include /usr/local/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 127.0.0.1:8049;
location / {
rewrite (.*)/favicon.(ico|png) /favicon.$2 last;
root /home/myuser;
}
}
}
Если (.*) заменить на (.+), то работает, а так:
2010/07/29 15:01:37 [error] 3547#0: *24 rewrite or internal redirection
cycle while processing "/favicon.ico", client: 127.0.0.1, server:
host.ru, request: "GET /favicon.ico HTTP/1.0", host: "127.0.0.1:8049"
как лечить иначе?
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|