1

I'm using my mac with XAMPP from apachefriends with the standard configuration.

I want to use a reverse proxy, so I edited the etc/extra/proxy-html.conf and added the following:

ProxyRequests Off
ProxyPass /my-gateway/ http://interner.server.test/
<Location /my-gateway/>
   ProxyPassReverse /
   ProxyHTMLEnable On
   ProxyHTMLURLMap http://interner.server.test/ /my-gateway/
   ProxyHTMLURLMap / /my-gateway/
</Location>

Now when I go to localhost/my-gateway, I get the Error 404 Object not found.

How to find out why this is not working?

peterh
  • 4,953
  • 13
  • 30
  • 44
gurehbgui
  • 113
  • 1
  • 1
  • 5

1 Answers1

2

First: I don't think you needed a such hard thing as a ProxyHTMLURLMap for a simple reverse proxy.

Second: try a localhost/my-gateway/ (with the ending slash!). Does it work?

Third: Here is a surely working config fragment:

<VirtualHost *:80>
  ServerName your.proxy.vhost.name
  ProxyRequests Off

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  ProxyPreserveHost On
  ProxyPass /my-gateway/ http://interner.server.test/
</VirtualHost>

Out of <VirtualHost should it work as well. This <Proxy directive is also needed.

peterh
  • 4,953
  • 13
  • 30
  • 44
  • Its also not working with the ending slash. I also tried your VirtualHost with the result, when I add the your.proxy.vhost.name to my hosts and then try to open it, I just reach the default localhost page. – gurehbgui Aug 11 '14 at 12:01
  • Its working now, I did a other small mistake – gurehbgui Aug 11 '14 at 12:55