Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Странное поведение при ре гулярных выражениях в serv er_name
- To: nginx-ru@xxxxxxxxx
- Subject: Странное поведение при ре гулярных выражениях в serv er_name
- From: Anton Bessonov <exelib@xxxxxxxxxxxxxx>
- Date: Wed, 16 Jun 2010 00:56:17 +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=+ijUkX1LwhIgB6K9kL7ww2az+S7J2IZ02Mo9eXLFHo4=; b=Lr9LWIkaTZYU+Ub/Loukx40KICY55MHjyQCRjwFfGP1QJg0xMxn8/AGZge2SQ2rZur D3Z2GRtMVywhMp99tMDy1NUoiPgFUfbmw672gIARAz7zcp+QGcs5DiXR4zBvxbB2lzto qTht7icwQmRnMqCCsgV/fBK3VcYCgRbzGbim4=
- 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=dfBa94UzCcFStJWo6OCM6dzoaL1wDv1cvAOnjo+uy4E2QHDdrXcIh4KxcCwFSeAmNv VzIo7iEdh9E7O5g/3wHqD3ijdYdi0HObQplcrTldXH7CC3gNg1YbzcrHLO/oV/js5oge Q4hj2nfpKXIC8SrDi8v68cv9RRokFOljkBdPk=
Всё идёт, а вот тут хоть тресни:
nginx_l1.conf
server {
listen 80;
#http://www.ruby-forum.com/topic/189724
server_name ~^(.*)\.beta\.site\.de$
~^www\.(.*)\.beta\.site\.de$;
set $subdomain $1;
#server_name ~^(www\.)?(?P<subdomain>.+)\.beta\.site\.de$;
location ~* ^.+.(html|gif|jpg|png|css|zip|rar|exe|com|txt)$ {
#root /home/site.de/subs/$subdomain;
#expires 30d;
proxy_buffering off;
proxy_pass http://127.0.0.1:1361;
}
location ~ {
fastcgi_cache off;
fastcgi_pass 127.0.0.1:1362;
fastcgi_index index.php;
include /usr/local/nginx/fastcgi.conf;
fastcgi_param DOCUMENT_ROOT /home/site.de/;
fastcgi_param SCRIPT_FILENAME
/home/site.de/subs/$subdomain$fastcgi_script_name;
}
}
nginx_l2.conf:
server {
listen 127.0.0.1:1361;
#server_name ~^(www\.)?(?P<subdomain>.+)\.beta\.site\.de$;
server_name ~^(.*)\.beta\.site\.de$ ~^www\.(.*)\.beta\.site\.de$;
set $subdomain $1;
location / {
root /home/site.de/subs/$subdomain;
access_log off;
#expires 30d;
}
}
значит fcgi и подобные конфиги работают. А тут полтергейст...
2010/06/15 22:53:40 [error] 25624#0: *293364 open()
"/home/site.de/subs//test.css" failed (2: No such file or directory),
client: 127.0.0.1, server: ~^(.*)\.beta\.site\.de$, request: "GET
/test.css HTTP/1.0", host: "127.0.0.1:1361"
то есть $subdomain пропущен...
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|