当前位置:首页 » Apache技术知识

apache 虚拟主机设置

2013-05-29 11:41 本站整理 浏览(4)

# 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前面的#号