Hi
OS: FC4
Apache v2.0.54
Server IP: 1.2.3.4
Server FQDN: main.mydomain.com
vDomain1: space.com
vDomain1: space.info
Symptom: i can not access web file reside in main Server's DocumentRoot (/var/www/html) after I made VirtualHost configuration. Instead I found my self in the DocumentRoot of one of the Virtual Hosts I definded (/var/www/space.com/html). This may because of my Confinuration.
In "httpd.conf" I have:
Quote:
ServerName main.mydomain.com:80
DocumentRoot "/var/www/html"
Include "conf.d/auth_mysql.conf"
Include "conf.d/manual.conf"
Include "conf.d/php.conf"
Include "conf.d/welcome.conf"
Include "conf.d/space.com.conf" // I made it
Include "conf.d/space.info.conf" // I made it
<Directory "/">Options FollowSymLinks
AllowOverride None </Directory>
<Directory "/var/www/html"> Options Includes
Order allow,deny
AllowOverride None </Directory>
**** The rest are with default values ***
|
In
"conf.d/space.com.conf" i have:
Quote:
NameVirtualHost 1.2.3.4:80
<VirtualHost 1.2.3.4:80>ServerName www.space.com
ServerAlias space.com
ServerAdmin dimsh@xxxx
DocumentRoot "/var/www/space.com/html"
DirectoryIndex index.php index.html index.htm
<Directory "/var/www/space.com/html/">Allow from all
AllowOverride All
Order allow,deny
Options None </Directory> </VirtualHost>
|
In
"conf.d/space.info.conf" i have:
Quote:
# The following directive has been definded already in
# the previous config file "space.com.conf" if it redifided
# here too you get warn "[warn] NameVirtualHost 209.172.55.171:80
# has no VirtualHosts".
# If the Include to file "space.com.conf" has beed excluded from
# httpd.conf's Include statement
# then you MUST turn this directive on:
#NameVirtualHost 1.2.3.4:80
<VirtualHost 1.2.3.4:80>ServerName www.space.info
ServerAlias space.info
ServerAdmin dimsh@xxxx
DocumentRoot /var/www/space.info/html
<Directory /var/www/space.info/html/>Allow from all
AllowOverride All
Order allow,deny </Directory>
Alias /roundcube /var/www/space.info/RoundCubemail
Alias /webmail /var/www/space.info/squirrelmail </VirtualHost>
<VirtualHost 1.2.3.4:80> ServerName mail2.space.info
ServerAdmin dimsh@xxxx
DocumentRoot /var/www/space.info/RoundCubemail
<Directory /var/www/space.info/RoundCubemail/>Allow from all
AllowOverride All
Order allow,deny </Directory> </VirtualHost>
<VirtualHost 1.2.3.4:80>ServerName mail.space.info
ServerAdmin dimsh@xxxx
DocumentRoot /var/www/space.info/squirrelmail
<Directory /var/www/space.info/squirrelmail/> Allow from all
AllowOverride All
Order allow,deny </Directory> </VirtualHost>
|
space.com.conf precedes space.info.conf in httpd.conf
I have phpAdsNew in "/var/www/html/phpAdsNew" and I can not reach it.
Every time I request the one of the following URLs:
http://1.2.3.4/
http://main.domain.com/
I got the page that resides in "/var/www/space.com/html" which is the DoumentRoot for the first VHost I have definded.
The request for
http://1.2.3.4/phpAdsNew returns Not Found.
Why does this happened, why i am in the htdocs of the first VHost not the second one for example (even I do not want this to happen at all) I want to be in the main DocRoot?
That does not make sence for me. Any Suggestions?
Thanks in advance.