How to set X-Forwarded-Server to reflect virtual host name (10.8.4 Server)
On my server (which runs 10.8.4 Server), the fqdn is a.example.com, but
the same IP number is also configured for b.example.com, c.example.com,
and d.example.com. A user going to http://a.example.com sees a different
website than one going to http://b.example.com, and so on. This all works.
I'm using mod_proxy and ProxyPass/ProxyPassReverse to handle ajax
requests. This works when the http request is for a.example.com, because
X-Forwarded-Server is set to a.example.com.
The problem occurs when the http request is for b.example.com. The problem
is that X-Forwarded-Server comes in as a.example.com instead of
b.example.com.
I think this is a Server specific issue, because I have a similar setup on
my laptop (except running 10.8.4 instead of 10.8.4 Server) for
development, but there X-Forwarded-Server gets set to the correct virtual
name. The only difference I can spot is that my laptop does not have a
fqdn; instead, I have entries in /etc/hosts (e.g., 127.0.0.1
example.local). Of course, there are many other differences as a
consequence of using Server.app for many of the settings.
I'm clearly missing a setting somewhere, but I'm not sure where to look.
Any suggestions would be appreciated.
No comments:
Post a Comment