Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proxy pass variable host
- To: nginx-ru@xxxxxxxxx
- Subject: Re: proxy pass variable host
- From: "Vladislav Vorobiev" <mymir.org@xxxxxxxxxxxxxx>
- Date: Mon, 20 Oct 2008 00:15:25 +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:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=4MBQ0P9HbKBk2Kb+dYFnzQGGBjFUfYFOUFczdrwBU6Y=; b=dVzNdYHWQd5vnsq3mvnkkigXV5cW7iuPrXg11wQ6xkS0/3TP7CXRRTz+1ofJUBl5EL 8gE4VAAmnR9n6yjY658kPwHn6hgCrew28P6Y/e4Pt9KqCbw6o8VqG8MgPkRyy9tg/oFO tNhocOGeAOWYeT1L+tf9GjsZq0luw9/OiYb0w=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=WEykDUWnBqhmEaKc57iSoK+2JtVUiJgYvZ1Q39A4qmUplPAJAeoJi2CkFzuM5DtosI 7qSC6EqM+1WISi7dJIE1g/xkMpfAemA3GyioKeAaBwc3NnuVoqzhA5A5jun9ZJYOrhL2 riOF2wfQnO4Dj0n9rEswnMcFD6t/92F2in2N4=
- In-reply-to: <604c02230810190548x383b2e1ds88a97e2adf210b4b@xxxxxxxxxxxxxx>
- References: <604c02230810190548x383b2e1ds88a97e2adf210b4b@xxxxxxxxxxxxxx>
> Добрый день,
>
> кто подскажит почему не работает конструкция типа (nginx-0.7.19)
>
> server {
> listen 80;
> server_name lala.host *.lala.host;
> proxy_pass
>
> http://localhost:8090/VirtualHostBase/http/$host:80/path/VirtualHostRoot/;
> }
> }
>
> без переменной host работает прекрасно!
>
> в логах 502
>
> 87.234.147.2 - admin [19/Oct/2008:14:22:06 +0200] "GET / HTTP/1.1" 502
> 173 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1)
> Gecko/2008071
> 87.234.147.2 - admin [19/Oct/2008:14:22:08 +0200] "GET /fsd HTTP/1.1"
> 502 173 "-"
>
> и
>
> 2008/10/19 14:40:36 [error] 25858#0: *502 no resolver defined to
> resolve localhost, client: XX.234.147.2, server: lala.host, request:
> "GET /fsd HTTP/1.1", host: " lala.host"
>
> resolver это же для
> proxy_pass $request; ?
>
> Мне нужно чтобы он на все *.lala.host реагировал.
>
>
>
> а apache было так
>
> <VirtualHost *>
> ServerName lala.host
> ServerAlias *lala.host
> RewriteEngine On
> RewriteRule ^/(.*)
> http://localhost:8090/VirtualHostBase/http/%{HTTP_HOST}:80/path/VirtualHostRoot/$1
> [L,P]
> </VirtualHost *>
Спасибо за внимание, после ужина дошло
http://127.0.0.1:8090/VirtualHostBase/http/$host:80/geoproject/VirtualHostRoot/$uri;
|