From owner-freebsd-java Wed Jun 19 3:30:28 2002 Delivered-To: freebsd-java@freebsd.org Received: from smtpzilla3.xs4all.nl (smtpzilla3.xs4all.nl [194.109.127.139]) by hub.freebsd.org (Postfix) with ESMTP id 5BFFA37B417 for ; Wed, 19 Jun 2002 03:30:05 -0700 (PDT) Received: from list1.xs4all.nl (list1.xs4all.nl [194.109.6.52]) by smtpzilla3.xs4all.nl (8.12.0/8.12.0) with ESMTP id g5JAU3Zc020325 for ; Wed, 19 Jun 2002 12:30:04 +0200 (CEST) Received: (from root@localhost) by list1.xs4all.nl (8.9.3/8.9.3) id MAA06996; Wed, 19 Jun 2002 12:30:03 +0200 (CEST) From: "Eelco Cramer" To: freebsd-java@freebsd.org X-Via: imploder /usr/local/lib/mail/news2mail/news2mail at list1.xs4all.nl Subject: Redirects won't work with Apache proxy on Orion (FreeBSD) Date: Wed, 19 Jun 2002 12:29:50 +0200 Organization: XS4ALL Internet BV Message-ID: Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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. ProxyVia On ProxyPass / http://localhost:8100/bar/ ProxyPassReverse / http://localhost:8100/bar/ ProxyVia On ProxyPass / http://localhost:8100/foo/ ProxyPassReverse / http://localhost:8100/foo/ 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