Re: Reverse proxy
Bret Stern <[email protected]> Mon, 6 Oct 2025 08:47:11 -0700
| Newsgroups | gmane.comp.apache.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the comment. I had to remove one of my virtual hosts to to get this working. My virtual host settings were triple checked...but the DocumentRoot kept reverting to the wrong virtual host DocRoot. If the apache logic is to use the ServerName directive in the [virthost *:80] as the deciding factor to set the DocRoot, then either there is another setting that I'm not aware of or there is a bug in the logic in apache. When I have more time to look, maybe it will surface. I have some other http servers in our environments, so will check those results as well. Regardless, all of this is excellent learning experience. Bret On 10/5/2025 12:08 AM, E.S. Rosenberg wrote: > Hey Bret, > > Unless I am very much mistaken you need to use the FQDN in the > ProxyPass directive and if you don't want to expose the "real" IP of > server B to the Internet you would need to "override" the public DNS > records either in /etc/hosts or if you have the ability to present a > different DNS view to server A and don't mind that complication that > would be another option. > You could I guess also use some internal FQDN as long as the > virtualhosts on server B know to respond to that too and all the links > they return are relative or rewritten to the domain server A presents. > > HTH, > Eliyahu - אליהו > > Op zo 5 okt 2025 om 09:34 schreef Bret Stern > <[email protected]>: > > Can someone please comment. > > Apache server A is a physical server on my network. I has three > virtual > hosts serving three > different websites. This appears to be working correctly. > > Introducing Apache server B > Apache server A also acts as a reverse proxy to Apache server B > which is > another separate server with a static ip, and > acts as my mail server. > > There are two virtual hosts defined on Apache server B, one is > mail.domain.com <http://mail.domain.com> and one is > postfixadmin.domain.com <http://postfixadmin.domain.com> > > My question is can Apache server A route (via reverse proxy) to > the two > virtual hosts on Apache server B. > > At this point it's close to working, but my > postfixadmin.domain.com <http://postfixadmin.domain.com> is > having it's document root directed to > virtual host mail.domain.com <http://mail.domain.com>, instead of > postfixadmin.domain.com <http://postfixadmin.domain.com> > > I've spent hours checking my virt host configurations. Is there some > other setting outside the virtual host configuration that > is allowing the DocumentRoot to be hijacked? > > Can someone please confirm my setup is possible? > Regards > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >