Xampp Apache 配置虚拟域名

1.找到 C盘 window->system32->drivers->etc->hosts文件用记事本打开,往里面添加

2.找到在C盘xampp目录进入apache->conf->extra->httpd-vhosts.conf文件,记事本打开在最后添加

 
    ServerAdmin [email protected]  
    DocumentRoot "C:\xampp\htdocs"  
    ServerName www.lucian.com  
         
            Options Indexes FollowSymLinks Includes ExecCGI  
            AllowOverride All  
            Require all granted  
       
 

 

解析  DocumentRoot  为服务器访问的目录; ServerName 为刚才设置的虚拟域名。

重启apache服务器就可以访问了

Xampp Apache 配置虚拟域名_第1张图片


你可能感兴趣的:(php,php)