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: "swamprunner7" <nginx-forum@xxxxxxxx>
- Date: Thu, 18 Nov 2010 09:53:24 -0500
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To:Date; bh=B3r1BxCqPTXEsbEkpCN+KSH57OJgoS/7scQC4fl+ePc=; b=dnC+zVIuR3zc282LTuktHUH9WPNDRDlbP4QRLkWNqvvI4KAk/ZpLCye7cAFv9ks+4emTXNZx0YOfODgYLDtFte1XHeWkHGa3UJtEwLYR0Wv2g+AzN1dkDmeL03ahm2G4;
Хочу перейти с apache mod_rewrite на nginx rewrite,
раньше было вот так:
[code]
RewriteCond %{HTTP_HOST} ^(www\.)?([0-9a-zA-Z\-]+)\.main\.com$ [NC]
RewriteRule ^$ /user.php?act=user&login=%2 [L]
[/code]
Вот конфиг:
[code]
worker_processes 1;
events
{
worker_connections 2000;
}
http
{
include mime.types;
sendfile on;
keepalive_timeout 65;
server_names_hash_bucket_size 64;
server
{
listen 80;
server_name *.main.test main.test;
location ~ \.php
{
proxy_pass http://127.0.0.1:8080;
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;
}
rewrite ^/air$ /feeds.php?act=air last;
client_max_body_size 15m;
charset utf-8;
}
}
[/code]
Как это сделать?
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,151694,151694#msg-151694
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|