apache的NameVirtualHost问题

apache的NameVirtualHost问题

我的系统是RHEL5/CentOS5
配置apache2的时候希望多个不同域名的虚拟主机搭这台机器上,废话不多说了,看配置文件:

NameVirtualHost *:80
<VirtualHost *:80>
        DocumentRoot /var/www/site1
        ServerName www.site1.com
        ServerAlias site1.com
</VirtualHost>

<VirtualHost *:80>
        DocumentRoot /var/www/site2
        ServerName www.site2.com
        ServerAlias site2.com
</VirtualHost>

NameVirtualHost *:443
<VirtualHost *:443>
        DocumentRoot /var/www/site1
        ServerName www.site1.com
        ServerAlias site1.com
</VirtualHost>

问题来了,site1的http和https都没问题,site2依旧转到site1的目录去了,另外我也试验过3个不同域名的http站,貌似apache只认最后两个虚拟主机,前面虚拟主机的都转到apache默认的DocumentRoot去了,我想实现的这个功能怎么配?
ps.不要建议我用ip virtualhost 或者 port virtualhost, 我只有一个公网的ip,并且我也不想客户需要输入端口号才能访问特定站点.

没用过VirtualHost哦,高手来吧
<VirtualHost *:80>
    ServerAdmin h3ewhack@163.com
    DocumentRoot /home//blog.hibelle.cn
    <Directory "/home/blog.hibelle.cn">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
       php_admin_value open_basedir "/tmp/:/home/blog.hibelle.cn"
                         php_admin_value safe_mode On
    </Directory>
    ErrorDocument 404 http://bbs.angcn.com
    AddType application/x-httpd-php .php
    CustomLog "|/usr/local/sbin/cronolog /home/logs/blog.hibelle.cn_%Y%m%d_access_log" combined
    #ErrorLog "|/usr/local/sbin/cronolog /home/logs/blog.hibelle.cn_%Y%m%d_error_log"
    ServerName blog.hibelle.cn
    ServerAlias blog.hibelle.cn
    CBandLimit 10240M
    #CBandSpeed 4086 50 100
    CBandPeriod 1H
</VirtualHost>
看看我这个在线使用的例子


NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@abc.com
    DocumentRoot /path/web/portal
    ServerName mail.abc.com
    ErrorLog logs/mail-error_log
    CustomLog logs/mail.com-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@abc.com
    DocumentRoot /path/web/corp
    ServerName email.abc.com
    ErrorLog logs/email-error_log
    CustomLog logs/email-access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@abc.com
    DocumentRoot /path/web/portal/nmc
    ServerName admin.abc.com
    ErrorLog logs/admin-error_log
    CustomLog logs/admin.com-access_log common
</VirtualHost>