[Win服务器] windowsserver2012r2服务器部署tp6项目

1842 0
王子 2022-10-19 14:30:12 | 显示全部楼层 |阅读模式
序:此前是一直部署的都是 liunx 的 CentOS 操作系统的,突然,接到一个是Windows的系统的服务器,把我整不会了,嘎,嘎...,差点就芭比Q了,看了大量文章,好吧,自己动手;
1、下载PHP,下载地址:windows.php.net - /downloads/releases/


2、安装包拷贝到到新建的php文件夹下并解压,复制一份php.ini-development 文件命名为php.ini


3、打开服务器管理,可以看到我已经下载了IIS,不过还可以在添加角色和功能 下安装其他需要的功能





一步步走,选择需要的功能;进入站点程序配置


选着配置,添加php模块映射,在默认文档里添加 index.php 放在第一位;





4、请求路径和模块都是像以下一样的,执行文件按你安装的目录来,名称自定义
img alt="" src="https://img.jbzj.com/file_images/article/202203/2022030216464799.png" />

然后在的访问的public下有一个web.configd的文件,这个是设置伪静态的,内容为:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.     <system.webServer>
  4.         <rewrite>
  5.             <rules>
  6.                 <rule name="OrgPage" stopProcessing="true">
  7.                 <match url="^(.*)$" />
  8.                 <conditions logicalGrouping="MatchAll">
  9.                 <add input="{HTTP_HOST}" pattern="^(.*)$" />
  10.                 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  11.                 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  12.                 </conditions>
  13.                 <action type="Rewrite" url="index.php/{R:1}" />
  14.                 </rule>
  15.             </rules>
  16.         </rewrite>
  17.         <defaultDocument>
  18.             <files>
  19.                 <add value="index.php" />
  20.             </files>
  21.         </defaultDocument>
  22.     </system.webServer>
  23. </configuration>
复制代码
5、点击网站下的网站目录,右侧有个浏览网站浏览 *.80(http) ,可以访问你的站点;
右侧这里可以配置修改你的网站目录、名称等等;
报错:vcruntime140.dll丢失的解决方法;
下载安装(下载后直接运行就可以):Download Visual C++ Redistributable for Visual Studio 2015 from Official Microsoft Download Center


6、证书绑定看下面的一篇参考文章;
参考文章:
windows server 2019开启iis服务器+tp5.1的配置
证书配置参考:
https://jingyan.baidu.com/article/154b46316f77fe28ca8f4136.html
到此这篇关于windows server 2012 r2 服务器部署tp6 项目的文章就介绍到这了,更多相关windows server 2012 r2 部署内容请搜索中国红客联盟以前的文章或继续浏览下面的相关文章希望大家以后多多支持中国红客联盟!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行