Apache virtual host config vs global config problem

Hi folks,

I am trying to configure Apache webserver and also a virtual host inside this webserver.

For Global server config: /var/www/html/index.html
For virtual host config: /var/www/virtual/index.html

Both client10 & www10 are pointing to 192.168.122.10 IP address.

BUT, MY Global webserver is also now pointing to virtual host's home page. I am not sure how to prevent this. Can anyone help/advice to fix it?

thanks.

[root@client10 conf]# cat httpd.conf | egrep -v "^$|#|^BrowserMatch|^AddLanguage|^LoadModule|^AddIcon"
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 60
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 4
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
Listen 192.168.122.10:80
Include conf.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
ServerName client10.example.com:80
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/html/private >
Order deny,allow
Allow from 127.0.0.1
</Directory>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log combined
ServerSignature On
Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_dav_fs.c>
DAVLockDB /var/lib/dav/lockdb
</IfModule>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/error/"
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/www/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>
</IfModule>
</IfModule>
NameVirtualHost 192.168.122.10
<VirtualHost 192.168.122.10>
ServerAdmin tony@www10.example.com
DocumentRoot /var/www/virtual
ServerName www10.example.com
ErrorLog logs/www10.example.com-error_log
CustomLog logs/www10.example.com-access_log common
</VirtualHost>

Hi folks,

I still need help on this topic. could anyone please help explain why my MAIN/DEFAULT web server is also pointing to the "virtual host" server and how to fix it?

thanks.

[root@client10 ~]# nslookup www10
Server: 192.168.122.10
Address: 192.168.122.10#53
Non-authoritative answer:
Name: www10.example.com
Address: 192.168.122.10

[root@client10 ~]# nslookup client10
Server: 192.168.122.10
Address: 192.168.122.10#53
Non-authoritative answer:
Name: client10.example.com
Address: 192.168.122.10

[root@client10 ~]# tail /etc/httpd/conf/httpd.conf
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/virtual
ServerName www10.example.com
ServerAdmin [EMAIL="tony@client10.example.com"]tony@client10.example.com[/EMAIL]
</VirtualHost>

[root@client10 ~]# httpd -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443 client10 (/etc/httpd/conf.d/ssl.conf:74)
*:80 is a NameVirtualHost
default server www10.example.com (/etc/httpd/conf/httpd.conf:1026)
port 80 namevhost www10.example.com (/etc/httpd/conf/httpd.conf:1026)
Syntax OK
[root@client10 ~]#