Opened 9 years ago

Closed 9 years ago

#833 closed defect (invalid)

Variables on proxy_pass set incorrect request

Reported by: hvelarde@… Owned by:
Priority: minor Milestone:
Component: nginx-module Version: 1.8.x
Keywords: Cc:
uname -a: Linux mysite.com 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u1 x86_64 GNU/Linux
nginx -V: 1.8.0

Description

module: ngx_http_proxy_module

upstream plone {

server 127.0.0.1:8081;
server 127.0.0.1:8082;

}

server {

listen 80 default_server;
server_name $hostname;

location / {

# proxy_cache backcache;
# proxy_cache_bypass $http_cache_control $cookie_ac;
add_header X-Proxy-Cache $upstream_cache_status;

proxy_pass http://plone/VirtualHostBase/http/$hostname:80/Plone/VirtualHostRoot/;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_ignore_headers Expires;

}

using this the request is passed to the backend always as "/VirtualHostBase/http/mysitet.com:80/Plone/VirtualHostRoot/".

the location is ignored and the root is always used.

Change History (1)

comment:1 by Maxim Dounin, 9 years ago

Resolution: invalid
Status: newclosed

This is expected behaviour. When variables are used in the proxy_pass argument, resulting string is expected to specify full URI of a requested resource, not just a replacement for a part matched by the location. See ticket #803 for some additional details.

Note: See TracTickets for help on using tickets.