You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Minh Cao <mi...@yahoo.com> on 2008/03/29 17:39:34 UTC

[users@httpd] Help apache 101


Hi, 

I am new to the web server .... please help me with
this 2 questions. 


1/  Setup the basic web server myhost.mydomain.com 
2/ Setup the virtual host www.mydomain.com 


My linux system hostname is:  myhost.mydomain.com 
IP: 1.2.3.4 
DNS:  www.mydomain.com  CNAME  myhost.mydomain.com 


Please explain this: 
If I use default DocumentRoot /var/www/html for
question #1, and use 
VirtualHost with DocumentRoot /var/www/virtual for #2,
I no longer see the index.html file from 
DocumentRoot of #1 


Question #1 does not asked to use the Virtual host. 
Can I just use the default DocumentRoot to config the
web server OR 
have to use the Virtual host ? 


Thanks 
Tam 




---------------------------------------------------------------------
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


Re: [users@httpd] Help apache 101

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, Mar 29, 2008 at 12:39 PM, Minh Cao <mi...@yahoo.com> wrote:
>
>
>  Hi,
>
>  I am new to the web server .... please help me with
>  this 2 questions.
>
>
>  1/  Setup the basic web server myhost.mydomain.com
>  2/ Setup the virtual host www.mydomain.com
>
>
>  My linux system hostname is:  myhost.mydomain.com
>  IP: 1.2.3.4
>  DNS:  www.mydomain.com  CNAME  myhost.mydomain.com
>
>
>  Please explain this:
>  If I use default DocumentRoot /var/www/html for
>  question #1, and use
>  VirtualHost with DocumentRoot /var/www/virtual for #2,
>  I no longer see the index.html file from
>  DocumentRoot of #1
>
>
>  Question #1 does not asked to use the Virtual host.
>  Can I just use the default DocumentRoot to config the
>  web server OR
>  have to use the Virtual host ?

I think you need to read this:
http://httpd.apache.org/docs/2.2/vhosts/name-based.html#using
which tells you that you need a <VirtualHost> section for every host
once you start to use NameVirtualHost. The DocumentRoot in the "main
server" no longer has an effect.

Joshua.

---------------------------------------------------------------------
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