xampp apache 本机多虚拟机配置

来源:互联网 发布:淘宝金牌卖家权重高吗 编辑:程序博客网 时间:2024/06/03 04:06

xampp 3.2.2


C:\Windows\System32\drivers\etc\hosts

hosts文件增加

127.0.0.1       www.test1.com
127.0.0.1       www.test2.com
127.0.0.1       www.test3.com
127.0.0.1       www.test4.com
127.0.0.1       www.test5.com
127.0.0.1       www.test6.com
127.0.0.1       www.test7.com
127.0.0.1       www.test8.com
127.0.0.1       www.test9.com



编辑E:\xampp\apache\conf\httpd.conf


<Directory "E:\xampp\htdocs2">

    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
Require all granted
#最后一句必须要有!
</Directory>



#Include conf/extra/httpd-vhosts.conf
#不可在Directory前出现


#不用httpd-vhosts.conf也可以了
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
ServerName www.test1.com
    DocumentRoot "E:/xampp/htdocs2"


    ErrorLog "logs/www.test1.com-error.log"
    CustomLog "logs/www.test1.com-access.log" common
</VirtualHost>