On 1/18/22 1:26 PM, Raphael Mejias Dias wrote:
Hello,

Hi,

I've modified a little my config file:

Okay.

     ProxyPass "zmz"  "http://raphaxx.intranet:8280/zm/      ProxyPassReverse "zmz" "http://raphaxx.intranet:8280/zm/";

I would expect the first parameter to be anchored / fully qualified from within the site's URL. E.g.

      ProxyPass          "/zmz"  "http://raphaxx.intranet:8280/zm/";
      ProxyPassReverse   "/zmz"  "http://raphaxx.intranet:8280/zm/";

My expectation would be that for this <VirtualHost> to proxy any requests to the "/zmz" path (sub-directory?) to the "/zm/" path on an HTTP server on port 8280 of raphaxx.intranet.

Aside: Make sure that "raphaxx.intranet" resolves where you want it to. Be mindful of IPv4 vs IPv6.

My ssl is ok, the ssl redirect is on default.conf

Okay.

But this ProxyReverse, I've been trying in many ways, another file, and so on, but nothing works.

I have the following in a config file for a service that I disabled a few months ago.

ProxyPass          "/"   "http://127.0.0.1:8080/";
ProxyPassReverse   "/"   "http://127.0.0.1:8080/";

This was in use in a Named Virtual Host that reverse proxied everything to port 8080 listening on localhost (127.0.0.1).

Aside: Port 8080 on localhost (127.0.0.1) was actually an SSH remote port forward to a web server running on the remote client machine.

You will want to adjust the source path ("/") and the destination ("http://127.0.0.1:8080/";) as you need. But this is copied verbatim from a site that I disabled recently. (Disabling is typical Ubuntu / Debian remove a sym-link so that the config is not in the sites-enabled directory. No changes to the actual config file.)

About the VirtualHost for the 8280, I'm guessing it was not necessary, because the 8280 is the VM and the VM has its own apache2.

ACK

I have a nat rule to redirect 192.168.0.15:8280 to my VM server 192.168.2.100:80 on my root server 192.168.0.15.

Okay.  That could be a complicating factor.

You say "NAT rule". I'm taking that to mean a Destination NAT (DNAT) rule for port forwarding. The important bit is that it doesn't alter the source IP (SNAT). So you could potentially be running into a TCP triangle scenario.

Unless you have a specific reason to use the NAT rule, I would strongly suggest altering the ProxyPass(Reverse) rules to use the proper target.

      ProxyPass          "/zmz"  "http://192.168.2.100:80/zm/";
      ProxyPassReverse   "/zmz"  "http://192.168.2.100:80/zm/";

Just avoid the potential for a TCP triangle all together.

Considering the potential complexity, please share what sort of errors / failures you are seeing. Given the remote nature of the real server (from the point of view of the Apache HTTPD instance), please provide output of a TCP dump for tests. Let's make sure that all the bases are covered.

About Caddy, I do not want to install another server and deal with another config.

I can fully understand and appreciate that.

Thanks!

You're welcome.



--
Grant. . . .
unix || die

Reply via email to