Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 32441 invoked from network); 4 Feb 2009 23:01:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2009 23:01:18 -0000 Received: (qmail 37606 invoked by uid 500); 4 Feb 2009 23:01:07 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 37588 invoked by uid 500); 4 Feb 2009 23:01:07 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 37578 invoked by uid 99); 4 Feb 2009 23:01:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 15:01:07 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [72.156.96.10] (HELO mail.no.steinmetznet.com) (72.156.96.10) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Feb 2009 23:00:58 +0000 Received: from [192.168.1.30] ([::ffff:192.168.1.30]) by mail.no.steinmetznet.com with esmtp; Wed, 04 Feb 2009 17:15:59 -0600 id 00470414.498A21AF.00001387 Received: from 127.0.0.1 (AVG SMTP 8.0.176 [270.10.16/1930]); Wed, 04 Feb 2009 17:00:37 -0600 Message-ID: <498A1E14.5010909@steinmetznet.com> Date: Wed, 04 Feb 2009 17:00:36 -0600 From: Robert Steinmetz AIA Reply-To: rob@steinmetznet.com Organization: Steinmetz & Associates User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14 MIME-Version: 1.0 To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Reverse Proxy URL confuion. Thanks for your help; I have interspersed my response below Matt McCutchen wrote: > On Wed, 2009-02-04 at 12:23 -0600, Robert Steinmetz AIA wrote: > >> Here is my entire current VirtualHost some of it is probably redundant, >> like the tags. >> I have tried a lot of variations and so far none of them have affected >> the error message I get. >> >> >>> >>> >>> ServerAdmin webmaster@localhost >>> ServerName application.mydomain.com >>> # DocumentRoot /var/www/application >>> >>> ProxyRequests Off >>> >>> >>> Order deny,allow >>> Allow from all >>> >>> >>> ProxyPreserveHost On >>> ProxyPass / http://192.168.1.2/application/ >>> # ProxyPass / http://192.168.1.2/ >>> ProxyPassReverse / http://192.168.1.2/application/ >>> # ProxyPassReverse / http://192.168.1.2/ >>> >>> SetOutputFilter proxy-html >>> ProxyHTMLInterp On >>> ProxyHTMLExtended On >>> ProxyHTMLURLMap / /application S >>> >>> >>> >>> >> When I access the server at http://application/mydomain/com >> >> I get the correct login screen which is actually >> >> http://application/mydomain.co/default.aspx >> > > My point was that while you can access the login page fine, it contains > an incorrect link that is sending you to the wrong page after you log > in. The purpose of mod_proxy_html is to adjust this link. > I think I knew that, however as you note below it seem to be having no effect. > >> After logging in I get this error >> >> >>> Server Error in '/application' Application. >>> ------------------------------------------------------------------------ >>> >>> >>> /The resource cannot be found./ >>> >>> * Description: *HTTP 404. The resource you are looking for (or one of >>> its dependencies) could have been removed, had its name changed, or is >>> temporarily unavailable. Please review the following URL and make >>> sure that it is spelled correctly. >>> >>> * Requested URL: */application/application/file.aspx >>> >> The browser says its at; >> >> http://applicaiton.mydomain.com/application/fileaspx >> >> If I edit the URL in the browser to >> >> http://application.mydoamin.com/file.aspx >> >> everything works fins and the application performs properly. >> > > Two issues: > > 1. The error you pasted suggests that your ProxyHTMLURLMap rule is not > taking effect at all. My guess is that you need to include the > configuration file that defines all the places links appear in HTML: > I agree it looks like the ProxyHTMLURLMap has no effect. However, in /etc/apache2/mods-available I have proxy_html.conf and proxy_html.load so it should be working unless something else needs to be done in my configuration to enable it The proxy_html.conf appears identical to the link you provided, and I am not getting any errors when I load apache or when I test the configuration, so I think it is being recognized. Checking the logs I see these errors; [Wed Feb 04 16:45:26 2009] [notice] Graceful restart requested, doing restart [Wed Feb 04 16:45:26 2009] [warn] NameVirtualHost *:80 has no VirtualHosts [Wed Feb 04 16:45:26 2009] [notice] Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.4 with Suhosin-Patch proxy_html/3.0.0 configured -- resuming normal operations [Wed Feb 04 16:48:15 2009] [error] proxy: ap_get_scoreboard_lb(1) failed in child 4494 for worker proxy:reverse [Wed Feb 04 16:48:15 2009] [error] proxy: ap_get_scoreboard_lb(0) failed in child 4494 for worker http://192.168.1.2/application/ > http://apache.webthing.com/svn/apache/filters/proxy_html/proxy_html.conf > > 2. Your ProxyHTMLURLMap rule is backwards, since you want to *remove* > the /application prefix from the links generated by the back-end (which > is the reverse of the scenario in the HOWTO, as you can see by comparing > your ProxyPass directive to those in the HOWTO). The rule should be: > > ProxyHTMLURLMap / /application > > (I don't understand what the capital S was doing at the end of your > rule.) > That was one of the many things I tried to see if I could get something to happen. I have now changed as suggested. and the response is still the same. > Once you get the HTML rewriting working, I appreciate your help, any ideas on what to attempt next? > you will need to enable > ProxyPassReverseCookieDomain and ProxyPassReverseCookiePath if your > application uses cookies. > > I don't believe it uses cookies, since if I manually rewrite URL everything works as its supposed to, but one the rewriting get working check that.. -- Robert Steinmetz, AIA Principal Steinmetz & Associates --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org