3 messages in ru.sysoev.nginxURL rewrite plus proxy pass problem
FromSent OnAttachments
Toby DiPasqualeJul 30, 2007 1:47 pm 
RoxisJul 30, 2007 1:55 pm 
Wayne E. SeguinJul 30, 2007 2:13 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:URL rewrite plus proxy pass problemActions...
From:Toby DiPasquale (code@public.gmane.org)
Date:Jul 30, 2007 1:47:36 pm
List:ru.sysoev.nginx

Hi all,

I'm using nginx and what I'd like to occur is the following: I'd like to host multiple apps, each hosted on their own Web server on different ports on the local machine. I'd like for nginx to proxy between these apps based on an URL path prefix, e.g.

http://localhost/path/place?query=1 --> http://localhost:8080/place?query=1

My config is pretty simple and looks like:

location / { root /var/www/html; } location /path/ { rewrite ^/path/(.*)$ $1 break; proxy_pass http://127.0.0.1:8080; }

However, when I click on an href="/path" link, I am sent back to the index page. Why is it not proxying the rewritten URL back to the instance on port 8080? How can I make it do that? Thanks for all your help.