apache 虚拟主机设置

# Virtual hosts
Include conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "/data/monitor/memcacheAdmin/"
    ServerName memAdmin.com
    ErrorLog "logs/dummy-host2.example.com-error_log"
    CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>
<Directory "/data/monitor/memcacheAdmin">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "/data/phoneplus"
    ServerName 10.254.33.104
    ErrorLog "logs/dummy-host2.example.com-error_log"
    CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>
<Directory "/data/phoneplus">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

去掉httpd.conf #NameVirtualHost *:80前面的#号

posted on 2013-05-29 11:41  lsl8966  阅读(210)  评论(0编辑  收藏  举报