HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Dumb Virtualhost Question (http://www.howtoforge.com/forums/showthread.php?t=41864)

DantePasquale 15th December 2009 21:39

Dumb Virtualhost Question
 
Hi All,

I have a really newbie question regarding the Apache Virtualhost directive in the /etc/apache2/sites-enabled files.

I'm running ISPConfig3. One of my sites http://www.cocoanet.us generates the following VirtualHost directive:

Code:

<VirtualHost *:80>
      DocumentRoot /var/www/cocoanet.us/web

    ServerName cocoanet.us
    ServerAlias *.cocoanet.us
    ServerAlias dantepasquale.cocoanet.us
    ServerAdmin webmaster@cocoanet.us
    ......

So, as I understand the documentation from Apache, this directive instructs Apache to listen on all IP addresses on port 80.

So, my dumb question is: My other sites have the same thing, so how do we actually get to the correct Virtualhost since we don't specify the IP???

Thanks for answering this dumb question :)

topdog 16th December 2009 07:43

name based virtual hosting uses the Host header that the client sides through via the request headers.

The server chooses which site to serve based on the servername and, or the serveralias


All times are GMT +2. The time now is 06:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.