【Laravel 】虚拟主机配置

一.
【文件】- host文件
【位址】- WINDOWS\system32\drivers\etc\hosts
【功能】- 加入本地ip虚拟域名
【内容】- 127.0.0.1 blog.com

二.
【文件】- httpd.conf文件
【位址】- \apache\conf\httpd.conf
【工作】- 去除#开启httpd-vhost.conf引用机制
【内容】-
#_Virtual hosts Include conf/extra/httpd-vhosts.conf

三.
【文件】- httpd-vhost.conf文件
【位址】- wamp\bin\apache\apache2.4.17\conf\extra\httpd-vhosts.conf
【工作】- 注册虚拟域名
【内容】-
<VirtualHost *:80> ServerAdmin webmaster@dummy-hosts.example.com DocumentRoot "C:\wamp\www\blog\public" ServerName www.blog.com ErrorLog "log/dummy-hosts2.example.com-error.log" CustomLog "logs/dummy-host2.example.com-access.log" common </VirtualHost>

补充: public 为Laravel真正入口文件。


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章