apache创建虚拟主机

域名:www.yangcheng.com

apache 配置文件目录:H:\AppServ\Apache24\conf\extra\httpd-vhosts.conf
 

host文件目录:

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

127.0.0.1      www.shop.com
127.0.0.1      www.zcbmxt.com
127.0.0.1      www.yangcheng.com

apache设置


    ServerAdmin [email protected]
    DocumentRoot "H:/yangcheng/web/"
    ServerName www.yangcheng.com
    ServerAlias www.yangcheng.com
    ErrorLog "logs/yangcheng.log"
    CustomLog "logs/yangcheng.log" common
    
   
       Options Indexes FollowSymLinks
       AllowOverride None
       Order Deny,Allow
       Allow from all
       Require all granted
   

    

 

 

你可能感兴趣的:(PHP)