- apache配置:httpd_conf文件,开启'rewrite_module';
- apache虚拟主机配置:在C:\xampp\apache\conf\extra目录下httpd_vhosts.conf中添加一个
<VirtualHost *:80>
##ServerAdmin webmaster@dummy-www.cctv.com
DocumentRoot "C:/xampp/htdocs/sites/cctv/public" //项目编译后的指定文件夹
ServerName www.cctv.com
ErrorLog "logs/dummy-book.songlei.com-error.log"
CustomLog "logs/dummy-book.songlei.com-access.log" common
</VirtualHost>
- 本地host配置:C:\Windows\System32\drivers\etc目录下hosts文件中添加 127.0.0.1 www.cctv.com;就可以将域名’www.cctv.com‘映射到本地IP上了
- 因为更改了配置文件所以重启服务器后,在浏览器地址栏输入’www.cctv.com‘就能链接到cctv/public/路径下的index.html文件中
laravel项目开发--快速配置
最新推荐文章于 2024-09-28 11:34:23 发布