httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] Understand "httpd -t -D DUMP_VHOSTS"
Date Sat, 25 Apr 2009 11:48:25 GMT
jeff00seattle wrote:
> Presented is the output of httpd -t -D DUMP_VHOSTS. 
> 
> Why does every NameVirtualHost reference its configuration twice; one for
> the default server and the other for the port #### namevhost?
> And why do all NameVirtualHost(s) have a default server reference, which
> seems conflicting.
> 
...
Jeff,
I think your question as asked is too complex, there are too many things 
at once, and you do not provide enough information to answer.
(First, can you tell what Apache version this is, on which platform, and 
initially installed how ?)

Another part that is a bit mysterious (to me at least), is why you would 
have Apache answering on several ports, specially if some of these ports 
do not even appear to be accessible from anywhere else but localhost.
(A reference to your other post "Remote Browsing of Other Ports than 
Port 80")
That greatly complicates the issue, maybe for no reason.
Can you eliminate these other ports, and just leave Apache answering on 
port 80, or is there some reason for the other ones ?
(If your sites have different DNS names, it is not really necessary to 
also have different ports)

An example :
evm2:~# /usr/sbin/apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
          default server evm2.domain1.com 
(/etc/apache2/sites-enabled/.default:1)
          port 80 namevhost evm2.domain1.com 
(/etc/apache2/sites-enabled/.default:1)
          port 80 namevhost maf.domain1.com 
(/etc/apache2/sites-enabled/MAF:1)
          port 80 namevhost bsp.domain2.net 
(/etc/apache2/sites-enabled/MIR:1)
          port 80 namevhost qa.domain2.net 
(/etc/apache2/sites-enabled/NYC:1)
          port 80 namevhost sales.domain3.net 
(/etc/apache2/sites-enabled/WIS:1)
Syntax OK

The same, commented :

All these virtual hosts answer requests on port 80.

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost

(means that Apache has found a line "NameVirtualHosts *:80"


          default server evm2.domain1.com 
(/etc/apache2/sites-enabled/.default:1)

That is the "default" server (the one used for requests to port 80, 
where Apache cannot really figure out for which hostname it is. It 
corresponds either to a section explicitly saying
<VirtualHost _default_:80>
or just to the first-occurring <VirtualHost *:80> section
)

          port 80 namevhost evm2.domain1.com 
(/etc/apache2/sites-enabled/.default:1)

corresponds to a section like
<VirtualHost *:80>
ServerName evm2.domain1.com
...
</VirtualHost>
It defines the Virtual Host handling requests to "evm2.domain1.com"

          port 80 namevhost maf.domain1.com 
(/etc/apache2/sites-enabled/MAF:1)

corresponds to a section like
<VirtualHost *:80>
ServerName maf.domain1.com
...
</VirtualHost>
It defines the Virtual Host handling requests to "maf.domain1.com"

etc...

          port 80 namevhost bsp.domain2.net 
(/etc/apache2/sites-enabled/MIR:1)
          port 80 namevhost qa.domain2.net 
(/etc/apache2/sites-enabled/NYC:1)
          port 80 namevhost sales.domain3.net 
(/etc/apache2/sites-enabled/WIS:1)
Syntax OK


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message