Apache mod_rewrite mod_proxy_html - Networking

This is a discussion on Apache mod_rewrite mod_proxy_html - Networking ; Hi, I'm using Apache and mod_rewrite to rewrite all request from an external URL to an internal URL. Unfortunatly the content contains sometimes FQDN to the internal server, which needs to be mapped to the external URL when access from ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Apache mod_rewrite mod_proxy_html

  1. Apache mod_rewrite mod_proxy_html

    Hi,

    I'm using Apache and mod_rewrite to rewrite all request from an external
    URL to an internal URL. Unfortunatly the content contains sometimes FQDN
    to the internal server, which needs to be mapped to the external URL
    when access from the outside. So I figured mod_proxy_html should be the
    module to use.

    So I've set up a virtual host like this:



    ErrorLog "/var/log/apache2/error.log"
    # LogLevel debug

    RewriteEngine On
    RewriteLog "/var/log/apache2/rewrite.log"
    # RewriteLogLevel 9

    RewriteCond %{HTTP_HOST} ^[^.]+\.external\.domain\.com
    RewriteRule ^(.+) http://%{HTTP_HOST}$1 [C]
    RewriteRule ^http://([^.]+)\.external\.domain\.com:8000(.*)$
    http://$1.internal.domain

    ProxyHTMLLogVerbose On
    #ProxyHTMLExtended On
    ProxyHTMLURLMap http://([^.]+).internal.domain
    http://$1.external.domain.com:8000



    If I understand the doc for mod_proxy_html I should see a bunch of
    messages in the error-log because of "ProxyHTMLLogVerbose On"; but that
    is not the case. Also the content is not being rewriten. Is there
    something I'm missing?

  2. Re: Apache mod_rewrite mod_proxy_html

    On Wed, 03 Jan 2007 07:54:56 +0100
    Henning Eiben wrote:

    > Is there
    > something I'm missing?


    Yes. You haven't configured a proxy at all. Nor have you
    activated mod_proxy_html. All you've done is to define a
    mapping that'll apply *if* you configure those two things.

    I suggest reading the reverse proxying tutorial referenced on
    the mod_proxy_html page. If that doesn't help, you can get
    low-cost support by subscribing as a user of mod_proxy_html.

    --
    Nick Kew

    Application Development with Apache - the Apache Modules Book
    http://www.apachetutor.org/

  3. Re: Apache mod_rewrite mod_proxy_html

    Nick Kew schrieb:

    >
    >> Is there
    >> something I'm missing?

    >
    > Yes. You haven't configured a proxy at all. Nor have you
    > activated mod_proxy_html. All you've done is to define a
    > mapping that'll apply *if* you configure those two things.
    >
    > I suggest reading the reverse proxying tutorial referenced on
    > the mod_proxy_html page. If that doesn't help, you can get
    > low-cost support by subscribing as a user of mod_proxy_html.



    Well, I thought that mod_proxy_html was enabled, since it's included in
    the "server-"attribute of the http-header

    So how would I configure a proxy? What I basically want is to
    reverse-proxy from the outside through apache to several web-servers on
    the inside ...

+ Reply to Thread