Date: Wed, 19 Jun 2002 12:29:50 +0200 From: "Eelco Cramer" <eelco@xs4all.nl> To: freebsd-java@freebsd.org Subject: Redirects won't work with Apache proxy on Orion (FreeBSD) Message-ID: <aepmf9$ctg$1@news1.xs4all.nl>
next in thread | raw e-mail | index | archive | help
Hi, I'm trying to get a configuration running where I can host multiple websites running on Orion. I'm running Orion on FreeBSD. I don't want to run orion as root so I'm using apache as a proxy to Orion. However it seems that redirects don't work properly. I have 2 virtual hosts setup on a hosts that is called www.myserver.com. <VirtualHost www.bar.com:80> ProxyVia On ProxyPass / http://localhost:8100/bar/ ProxyPassReverse / http://localhost:8100/bar/ </VirtualHost> <VirtualHost www.foo.com.com:80> ProxyVia On ProxyPass / http://localhost:8100/foo/ ProxyPassReverse / http://localhost:8100/foo/ </VirtualHost> When I access www.myserver.com then bar.com will show (prolly because it's the first virtual host). Now, the problem is when I'm trying to access a folder on one of the 2 virtual hosts without a trailing slash the forward will bring me to myserver.com instead of the folder I'm expecting. For example: I'm trying to access: http://www.foo.com/apple This will result in a request to: http://localhost:8100/foo/apple Because this request is accessing a directory Orion will now sent a redirect to: http://localhost:8100/foo/apple/ Will should result in a forward for my browser to: http://www.foo.com/apple/ However for some reason my browser will try to access: http://www.myserver.com/apple/ Also when I'm accessing a page called: http://www.foo.com/apple/page1.jsp And this page sends a redirect by calling: response.sendRedirect("page2.jsp"); My browser will try to access: http://www.myserver.com/apple/page2.jsp instead of http://www.foo.com/apple/page2.jsp So somewhere in the proxying process something is going wrong. Does anyone know a solution for this problem? Is it a known problem? Is my proxy configuration correct? Any ideas would be much appreciated. Cheers, Eelco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aepmf9$ctg$1>