[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache's strange behavior on Debian?

[D'ouh! I only saw your response in my inbox and didn't notice that a
copy also went to the list.]

> Just to clarify, I have one Apache installation on a frond-end proxy, and
> one on a backend server. On the backend, I have 2 Apache virtual hosts
> configured on the backend individually called ServerA.local and
> ServerB.local, 2 Apache virtual hosts on the proxy called ServerA.com and
> ServerB.com for corresponding virtual hosts on the backend. So the traffic
> is expected to like below:
> https://ServerA.com => https://ServerA.local
> https://ServerB.com => https://ServerB.local

Ok, I get that.

> I have "ProxyPreserveHost On" on the proxy side for both apache virtual
> hosts,

Why? I didn't want to imply that it is a solution to your problem. I
just wanted to mention it since I found it helpful in one case.  You
only need ProxyPreserveHost if your backend server is configured to use
the same ServerName as your frontend server.

> also had "%{X-Forwarded-For}i %v %l %u %t \"%r\" %>s %b" options for
> verbose logging on the backend, everytime when I go https://ServerB.com,
> the contents of https://ServerA.com get displayed, on the proxy logging
> side, I do see the correct URL https://ServerB.com when the requests coming
> in, but on the backend, I see serverA-local.log records all the activities,
> clearly the traffic has been directed to the wrong Apache virtual host on
> the backend.

Can you please quote the corresponding log entries? Your description is
not specific enough for my pedantic taste.

> Since everything is displayed fine w/o going through proxy
> (i,e: https://ServerB.local & https://ServerA.local displays everything
> fine), I assume something is broken on the Apache proxy?

Looks like it. Can you maybe post your configs again, with as little
editing as possible?

Generally, the only thing you need to make sure is that your ServerNames
match the hostname that you use in your URLs. My guess is that none of
your VirtualHosts matches and Apache just picks the first one as the
default. Maybe it helps to re-read the documentation for name-based
virtual hosting?


Atrocities committed in Rwanda pervade my mind when I am discussing
mundanities with acquaintances.
[Agree]   [Disagree]

Attachment: signature.asc
Description: Digital signature

Reply to: