httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Frost <>
Subject Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution
Date Thu, 10 Jan 2013 12:03:34 GMT
Hi Adam

Thanks for your reply. 

Yes, I did c/p and then replace the domains with the placeholders.

I too noticed that there wasnt any entry for, and I have been down the same
process you advised of starting with one working and gradually adding.

So I start off with httpd.conf and the relevant lines are:

NameVirtualHost *:80
>Include conf.d/*.conf
><IfDefine PROXY>
><VirtualHost *:80>
><Location /epages/>
>    <IfDefine LB>
>        ProxyPass balancer://cluster/epages/
>        ProxyPassReverse balancer://cluster/epages/
>    </IfDefine>
>    <IfDefine !LB>
>        ProxyPass xxxxxxxxxxxxxxxxxxxxxxx
>        ProxyPassReverse  xxxxxxxxxxxxxxx
>    </IfDefine>
>Only the first VirtualHost is specified. apachectl -t -D DUMP_VHOSTS produces:

VirtualHost configuration:
>          localhost (/etc/httpd/conf.d/ssl.conf:81)
>Syntax OK
>So, again, as you mentioned, Apache doesnt know what to do with Is
this because the VirtualHost definition is enclosed within an IfDefine?

But navigating to brings up my epages website (which is correct). 

So then I go and add in a second VirtualHost

<VitualHost *:80>
>DocumentRoot /var/www/html/myroot
>and the DUMP_VHOSTS output is:

VirtualHost configuration:
>          localhost (/etc/httpd/conf.d/ssl.conf:81)
>wildcard NameVirtualHosts and _default_ servers:
>*:80                   is a NameVirtualHost
>         default server (/etc/httpd/conf/httpd.conf:998)
>         port 80 namevhost (/etc/httpd/conf/httpd.conf:998)
>Syntax OK
>So now Apache knows about url2, but still doesnt know about URL1.

And now, and both go to my second site, never epages.


Sorry for the long message, just trying to show the steps I've taken and the output at each

Thanks again for your help.


 From: Adam Dosch <>
To: Tom Frost <>; 
Sent: Wednesday, 9 January 2013, 17:36
Subject: Re: [users@httpd] VirtualHost configuration not working as expected with ePages solution

Sorry for the belated reply.

> The output requested is:
> VirtualHost configuration:
> localhost (/etc/httpd/conf.d/ssl.conf:81)
> wildcard NameVirtualHosts and _default_ servers:
> *:80 is a NameVirtualHost
>  default server
> (/etc/httpd/conf.d/zzz-epages-httpd.conf:215)
>  port 80 namevhost
> (/etc/httpd/conf.d/zzz-epages-httpd.conf:215)
>  port 80 namevhost
> (/etc/httpd/conf.d/zzz-epages-httpd.conf:225)
>  port 80 namevhost
> (/etc/httpd/conf.d/zzz-epages-httpd.conf:215)
>  port 80 namevhost
> (/etc/httpd/conf.d/zzz-epages-httpd.conf:225)
> Syntax OK

I'm assuming you copy/pasted this out and replaced the real domains to 'protect the innocent'. 
But if you didn't flub copy/paste, I --do not-- see any indication that Apache knows what
to do or will do anything specific when a request comes in for ''.  If you
notice the output above, you will always default to '' for any HTTP request
coming in on that listening service on that IP address.  There isn't --any-- VirtualHost
reference to 'url1' listed.

I forgot what your VirtualHost containers looked like for both ur1 and ur2 domains, but I
think you definitely just take a isolation approach to it:  work with one, get it working
with it's own VirtualHost container, then add another vhost in and so on, then re-verify with
'apachectl -t -D DUMP_VHOSTS' and from a web browser.  From there once you get it nailed
down, then do any merging for maintenance sake on your .conf files.

Hope that helps.


> -------------------------
>  FROM: Adam Dosch
>  TO: Tom Frost ;
>  SENT: Thursday, 3 January 2013, 19:28
>  SUBJECT: Re: [users@httpd] VirtualHost configuration not working as
> expected with ePages solution
> Tom,
> I'd be curious what the output of your 'apachectl -t -D DUMP_VHOSTS'
> looks like?
> I've come across this problem as well in a related degree, and
> interrogating the output of the 'DUMP_VHOSTS' above will at least tell
> you the top-to-bottom order your vhost requests will travel down in
> your configuration.
> One way I had to solve it was take my VirtualHost container for
> '_default_', put it in it's own configuration file and include it
> prior to any other vhost config files in httpd.conf. It looked a bit
> like this in my httpd.conf:
>  NameVirtualHost *:80
>  Include conf/mydefault-vhost.conf # which would contain your default
> vhost container for
>  Include conf/*-vhost.conf # contain your others like url1, urlfoo,
> urlboo, urlbar, etc., it would be one config, or many, your choice.
> Using this approach, I did notice that a blanket wildcard/greedy
> include of all *.conf file gives you varying results, especially if
> you were managing all your vhosts in separate configuration files for
> clarity/organization sake like I was.
> Otherwise, sounds like you've verified client-side caching. My last
> logical thought would be perhaps if you're not using CNAME's in DNS
> for this and right-out calling them from the client without any
> hostname resolution on those FQDNs, that you need to add that those
> host aliases of '' and '' to your
> /etc/hosts or equiv in Windows.
> -A
> On Thu, 3 Jan 2013 08:05:26 -0800 (PST), Tom Frost wrote:
>> If I use either or they both go
>> to the VirtualHost site.
>> I have cleared caches and done a Ctrl-F5 to force the page to
> reload.
>> I'm sure that its something to do with epages, as I said there is a
>> lot of other config in there but I'm honestly not sure what is what.
>> Thanks again for your help, any more suggestions would be
> appreciated.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [1]
> For additional commands, e-mail: [2]
> Links:
> ------
> [1]
> [2]
View raw message