phpstudy2020搭建站点的实现示例

phpstudy2020搭建站点的实现示例

扫码添加渲大师小管家,免费领取渲染插件、素材、模型、教程合集大礼包!

1.下载phpstudy(到官网下载)。并安装后。启动phpstudy

2. 进入c:\windows\system32\drivers\etc路径下的hosts文件。进行如下配置

127.0.0.1xxxxadmin.com127.0.0.1xxxxpartneradmin.com127.0.0.1xxxxboadmin.com127.0.0.1xxxxbadmin.com

3.在面板的网站下。点击创建网站。如图所示

4.修改nginx文件配置

找到相对应的文件。修改如下(主要增加nginx环境配置伪静态去掉index.php)

server{listen80;server_namenewsaiboweb.com;root"E:/phpstudy_pro/WWW/new-saibo-web/public";location/{indexindex.phpindex.htmlerror/index.html;if(!-e$request_filename){rewrite^(.*)$/index.php?s=$1last;break;}error_page400/error/400.html;error_page403/error/403.html;error_page404/error/404.html;error_page500/error/500.html;error_page501/error/501.html;error_page502/error/502.html;error_page503/error/503.html;error_page504/error/504.html;error_page505/error/505.html;error_page506/error/506.html;error_page507/error/507.html;error_page509/error/509.html;error_page510/error/510.html;autoindexoff;}location~\.php(.*)${fastcgi_pass127.0.0.1:9000;fastcgi_indexindex.php;fastcgi_split_path_info^((?U).+\.php)(/?.+)$;fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;fastcgi_paramPATH_INFO$fastcgi_path_info;fastcgi_paramPATH_TRANSLATED$document_root$fastcgi_path_info;includefastcgi_params;}}

5.到此结束了。本地跑下试试!

到此这篇关于phpstudy2020搭建站点的实现示例的文章就介绍到这了,更多相关phpstudy2020搭建站点内容请搜索渲大师以前的文章或继续浏览下面的相关文章希望大家以后多多支持渲大师!

原文链接:https://blog.csdn.net/huha666/article/details/106943938/

分享到 :
相关推荐

站长选择香港CN2服务器的原因是什么(香港cn2服务器怎么样)

站长选择香港CN2服务器的原因是:1。CN2网络结构完善。线路传输速度快。能够给予用...

网站服务器迁移数据需要注意什么(网站服务器迁移数据需要注意什么问题)

以前使用传统物理服务器的企业。在进行服务器升级的时候。选择了性能更好的云服务器。那么...

​马来西亚服务器租用有什么优势

马来西亚服务器租用的优势:1.马来西亚服务器的价格在东南亚IDC行业中相对比较便宜[...

香港云主机怎么样(香港云主机要怎么挑选呢)

云时代的来临使得越来越多的人开始使用云主机,云主机也受到越来越多的个人以及公司的青睐...

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注