# Apache reverse proxy and java applets

## massctrl

Hi all,

I'm having this situation:

Webbrowser -----> NIC 1 - 192.168.1.2 Server running Apache with reverse proxy NIC 2 - 10.0.0.10 -----> 10.0.0.11 Hardwareappliance with java pplets. listening on port 82

My webserver has 2 networkinterfaces.  The webserver can access 10.0.0.11 without a problem.

I want to be able to show the contents of 10.0.0.11 to my client webbrowsers.

This works for the html stuff etc,..... but not for the JAVA applets,.......

This is a part of my httpd.conf relevant to this.

I followed the instructions found at http://www.apacheweek.com/features/reverseproxies

```
ProxyRequests off

ProxyHTMLExtended On

ProxyPass /test/ http://10.0.0.11:82/

ProxyHTMLURLMap http://10.0.0.11:82 /test

<Location /test/>

        ProxyPassReverse /

       SetOutputFilter  proxy-html

        ProxyHTMLURLMap  /      /test/

        ProxyHTMLURLMap  /test  /test

        RequestHeader    unset  Accept-Encoding

</Location>
```

Can someone point me in the right direction please ?

Thanks in advance,

----------

## Ausdonky

Hi Massctrl,

Not sure if youd worked this out or not yet.. You should be able to just use the following:

```

NameVirtualHost *:80

<VirtualHost *:80>

    ProxyPass /test/ http://10.0.0.11:82/

    ProxyPassReverse /test/ http://10.0.0.11:82/

</VirtualHost>

```

and if you want to use domain name also add:

```

ServerName <yourdomainname.com>

```

into the virtualhost section

The only reason you would need to use HTML URL Mapping is if you have links in the page being hosted on the hardware applience that you would like translated to look like they are all coming from 192.168.1.2 (or from your servers name or some other DNS name?). Although.. if this is the case you would want to use something like:

```

NameVirtualHost *:80

<VirtualHost *:80>

    ProxyPass /test/ http://10.0.0.11:82/

    ProxyPassReverse /test/ http://10.0.0.11:82/

    ProxyHTMLURLMap http://10.0.0.11:82/ http://192.168.1.2/

    SetOutputFilter proxy-html

</VirtualHost>

```

or similar  :Smile:    Note the addition of the ProxyHTMLURLMap will replace any html code with http://10.0.0.11:82/ with http://192.168.1.2/ so you may need to play around with this (or add multiple URL maps if this doesnt match your situation exactly.

HTH

Andrew (ausdonky)

----------

## massctrl

Hello Ausdonky,

Thanks for the answer and the late reply,..

I will try your suggestion and let you know the result.

----------

