# ProxyHTMLURLMap [SOLVED]

## expat_iain

I'm trying to get a reverse proxy up and running on Apache2.0.55-r1 from Portage. I've installed the mod_proxy_html modules from Portage also. Setting up a virtual host config as:

```
<VirtualHost www.example.com:80>

        CustomLog /var/log/apache2/www.example.com-access_log "%h %l %u %t \"%r\" %>s %b"

        ServerName unibet.waldonet.net.mt

        ProxyRequests off

        ProxyPass / http://www.example.com/

        ProxyPassReverse / http://www.example.com/

        SetOutputFilter proxy-html

        ProxyHTMLURLMap ^http?://www.example.com/ http://dummy.example.net/ R

        # ProxyHTMLLogVerbose On

</VirtualHost>
```

When executing apache2ctl-t I get the following:

```
Syntax error on line 8 of /etc/apache2/vhosts.d/unibet.conf:

Invalid command 'ProxyHTMLURLMap', perhaps mis-spelled or defined by a module not included in the server configuration
```

Interestingly enough, I also get a similar error when I uncomment the ProxyHTMLLogVerbose..which is a bit of a pain too.

I have in my /etc/apache2/httpd.conf:

```
<IfDefine PROXY>

    LoadModule proxy_module                  modules/mod_proxy.so

    LoadModule proxy_connect_module          modules/mod_proxy_connect.so

    LoadModule proxy_ftp_module              modules/mod_proxy_ftp.so

    LoadModule proxy_http_module             modules/mod_proxy_http.so

</IfDefine>
```

...and I'm starting apache with options

```
-D PROXY
```

Anyone know why this directive is not being taken??

Iain.Last edited by expat_iain on Thu Feb 23, 2006 2:51 pm; edited 1 time in total

----------

## Monkeh

Because, perhaps, acccording to http://httpd.apache.org/docs/2.0/mod/mod_proxy.html, it's not a valid directive?

----------

## expat_iain

Although in other places it is mentioned:

```
http://forums.gentoo.org/viewtopic-t-211201-highlight-proxyhtmlurlmap.html

http://apache.webthing.com/mod_proxy_html/config.html

http://www.wlug.org.nz/ApacheReverseProxy
```

----------

## Monkeh

Well, it's not in the docs, and since it throws up an error for you, I'll assume the docs are rght.

----------

## expat_iain

Bad day...had not noticed I'd missed out the following:

```
LoadModule proxy_html_module  lib/apache2/modules/mod_proxy_html.so
```

----------

## Ausdonky

Hi Iain,

The easy fix for this is just to include -D PROXY_HTML in your command line

check out /etc/apache2/modules.d/27_mod_proxy_html.conf to see why  :Smile:  (N.B. this conf file is installed with mod_proxy_html)

probably better to use the define than to hack your conf file as it makes it a bit safer with future updates.

monkeh.. dont flame him cause he didnt know! you didnt know either.. (it isnt a part of mod_proxy.. it is in mod_proxy_html as said in Iain's first post)

Andrew (ausdonky)

----------

