[thelist] Apache virtual Host Problem

Ali Almutawa aamutawa at batelco.com.bh
Thu Aug 28 17:28:32 CDT 2003


I have managed to configure my apache httpd.conf file to show me the
default page on , as well manged to create a virtual
host called www.firsthost.com and its alias "first" which both work
fine. I have added another host which is called secondhost.com and its
alias "second", here where the problem appears. When going to
www.secondhost.com I got the index file of the www.firsthost.com, while
if I typed the alias name "second" it will show the coorect index file
for secondhost.com.

Would you pleae help me in sorting this problem ?

Below is the snapshots or the virtual host I have created, also the
output of the httpd -S command and the /etc/hosts files to do the
resolving for the site.

Thanks in advance,
Ali Almutawa

httpd.conf :


    ServerAdmin aamutawa at batelco.com.bh
    DocumentRoot /var/www/html/firsthost.com
    ServerName firsthost.com
    ServerAlias first
    ErrorLog logs/fisrthost.com-error_log
    CustomLog logs/firstlog.com-access_log common

	ServerAdmin aamutawa at batelco.com.bh
	DocumentRoot /var/www/html/secondhost.com
	ServerName secondhost.com
	ServerAlias second
	ErrorLog logs/secondhost.com-error_log
	CustomLog logs/secondhost.com-access_log common


[root at rh7 root]# httpd -S
VirtualHost configuration:           is a NameVirtualHost
                       default server firsthost.com
                       port 80 namevhost firsthost.com
                       port 80 namevhost secondhost.com


# Do not remove the following line, or various programs
# that require network functionality will fail.	rh7.aamutawa.com	localhost	www.firsthost.com first	www.secondhost.com second


Ali Almutawa [ XCI4 ]
STC Systems Management
Office : 00973 883474 Mobile : 00973 9688797
Fax : 00973 9103474

More information about the thelist mailing list