phpstudy2020搭建站点的实现示例


Posted in PHP onOctober 30, 2020

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

phpstudy2020搭建站点的实现示例

2. 进入C:\Windows\System32\drivers\etc路径下的hosts文件,进行如下配置

127.0.0.1 xxxxadmin.com
127.0.0.1 xxxxpartneradmin.com
127.0.0.1 xxxxboadmin.com
127.0.0.1 xxxxbadmin.com

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

phpstudy2020搭建站点的实现示例

4.修改nginx文件配置

phpstudy2020搭建站点的实现示例

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

server {
    listen    80;
    server_name newsaiboweb.com;
    root  "E:/phpstudy_pro/WWW/new-saibo-web/public";
    location / {
      index index.php index.html error/index.html;
      if (!-e $request_filename){
        rewrite ^(.*)$ /index.php?s=$1 last;
    break;
      }
      error_page 400 /error/400.html;
      error_page 403 /error/403.html;
      error_page 404 /error/404.html;
      error_page 500 /error/500.html;
      error_page 501 /error/501.html;
      error_page 502 /error/502.html;
      error_page 503 /error/503.html;
      error_page 504 /error/504.html;
      error_page 505 /error/505.html;
      error_page 506 /error/506.html;
      error_page 507 /error/507.html;
      error_page 509 /error/509.html;
      error_page 510 /error/510.html;
      autoindex off;
    }
    location ~ \.php(.*)$ {
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index index.php;
      fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      fastcgi_param PATH_INFO $fastcgi_path_info;
      fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
      include    fastcgi_params;
    }
}

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

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

PHP 相关文章推荐
用Apache反向代理设置对外的WWW和文件服务器
Oct 09 PHP
用PHP写的MySQL数据库用户认证系统代码
Mar 22 PHP
解决MySQL中文输出变成问号的问题
Jun 05 PHP
关于shopex同步ucenter的redirect问题,导致script不运行
Apr 10 PHP
php 批量查询搜狗sogou代码分享
May 17 PHP
PHP多态代码实例
Jun 26 PHP
从刷票了解获得客户端IP的方法
Sep 21 PHP
PHP未登录自动跳转到登录页面
Dec 21 PHP
微信小程序 消息推送php服务器验证实例详解
Mar 30 PHP
PHP中非常有用却鲜有人知的函数集锦
Aug 17 PHP
PHP7原生MySQL数据库操作实现代码
Jul 03 PHP
详解PHP设计模式之依赖注入模式
May 25 PHP
解决PHPstudy Apache无法启动的问题【亲测有效】
Oct 30 #PHP
PhpStorm 2020.3:新增开箱即用的PHP 8属性(推荐)
Oct 30 #PHP
2020最新版 PhpStudy V8.1版本下载安装使用详解
Oct 30 #PHP
PHP fopen中文文件名乱码问题解决方案
Oct 28 #PHP
PHP dirname功能及原理实例解析
Oct 28 #PHP
基于ThinkPHP删除目录及目录文件函数
Oct 28 #PHP
PHP tp5中使用原生sql查询代码实例
Oct 28 #PHP
You might like
PHP实现把文本中的URL转换为链接的auolink()函数分享
2014/07/29 PHP
php跨站攻击实例分析
2014/10/28 PHP
CI框架中通过hook的方式实现简单的权限控制
2015/01/07 PHP
kindeditor 加入七牛云上传的实例讲解
2017/11/12 PHP
List Information About the Binary Files Used by an Application
2007/06/18 Javascript
动态加载图片路径 保持JavaScript控件的相对独立性
2010/09/06 Javascript
JQuery Highcharts 动态生成图表的方法
2013/11/15 Javascript
纯JS实现可拖拽表单的简单实例
2016/09/02 Javascript
jQuery自定义组件(导入组件)
2016/11/08 Javascript
微信小程序支付及退款流程详解
2017/11/30 Javascript
JS实现将二维数组转为json格式字符串操作示例
2018/07/12 Javascript
微信小程序CSS3动画下拉菜单效果
2018/11/04 Javascript
微信小程序 扭蛋抽奖机css3动画实现详解
2019/07/19 Javascript
vue+elementUI动态生成面包屑导航教程
2019/11/04 Javascript
jquery实现聊天机器人
2020/02/08 jQuery
Python中for循环详解
2014/01/17 Python
Django与JS交互的示例代码
2017/08/23 Python
Python中列表list以及list与数组array的相互转换实现方法
2017/09/22 Python
Python3 模块、包调用&路径详解
2017/10/25 Python
使用 Python 实现微信公众号粉丝迁移流程
2018/01/03 Python
django文档学习之applications使用详解
2018/01/29 Python
Python实现替换文件中指定内容的方法
2018/03/19 Python
python 将字符串完成特定的向右移动方法
2019/06/11 Python
python提取log文件内容并画出图表
2019/07/08 Python
海淘零差价,宝贝全球购: 宝贝格子
2016/08/24 全球购物
中年人生感言
2014/02/04 职场文书
2014党员四风对照检查材料思想汇报
2014/09/17 职场文书
黄石寨导游词
2015/02/05 职场文书
大学生简历自我评价2015
2015/03/03 职场文书
2015年双拥工作总结
2015/04/08 职场文书
民间借贷纠纷起诉书
2015/08/03 职场文书
关爱留守儿童主题班会
2015/08/13 职场文书
2016学习医德医风心得体会
2016/01/25 职场文书
2019年图书室自查报告范本
2019/10/12 职场文书
Python激活Anaconda环境变量的详细步骤
2021/06/08 Python
使用Python通过企业微信应用给企业成员发消息
2022/04/18 Python