windows server 2012 r2 服务器部署tp6 项目

2025-05-27 0 66

序:此前是一直部署的都是 liunx 的 CentOS 操作系统的,突然,接到一个是Windows的系统的服务器,把我整不会了,嘎,嘎…,差点就芭比Q了,看了大量文章,好吧,自己动手;

1、下载PHP,下载地址:windows.php.net – /downloads/releases/

windows server 2012 r2 服务器部署tp6 项目

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

windows server 2012 r2 服务器部署tp6 项目

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

windows server 2012 r2 服务器部署tp6 项目

windows server 2012 r2 服务器部署tp6 项目

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

windows server 2012 r2 服务器部署tp6 项目

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

windows server 2012 r2 服务器部署tp6 项目

windows server 2012 r2 服务器部署tp6 项目

4、请求路径和模块都是像以下一样的,执行文件按你安装的目录来,名称自定义

windows server 2012 r2 服务器部署tp6 项目

然后在的访问的public下有一个web.configd的文件,这个是设置伪静态的,内容为:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="OrgPage" stopProcessing="true">
                <match url="^(.*)$" />
                <conditions logicalGrouping="MatchAll">
                <add input="{HTTP_HOST}" pattern="^(.*)$" />
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.php/{R:1}" />
                </rule>
            </rules>
        </rewrite>
        <defaultDocument>
            <files>
                <add value="index.php" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

5、点击网站下的网站目录,右侧有个浏览网站浏览 *.80(http),可以访问你的站点;

右侧这里可以配置修改你的网站目录、名称等等;

报错:vcruntime140.dll丢失的解决方法;

下载安装(下载后直接运行就可以):Download Visual C++ Redistributable for Visual Studio 2015 from Official Microsoft Download Center

windows server 2012 r2 服务器部署tp6 项目

6、证书绑定看下面的一篇参考文章;

参考文章:

windows server 2019开启iis服务器+tp5.1的配置

证书配置参考:

https://jingyan.baidu.com/article/154b46316f77fe28ca8f4136.html

到此这篇关于windows server 2012 r2 服务器部署tp6 项目的文章就介绍到这了,更多相关windows server 2012 r2 部署内容请搜索快网idc以前的文章或继续浏览下面的相关文章希望大家以后多多支持快网idc!

原文地址:https://blog.csdn.net/qq_41408081/article/details/123211735

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

快网idc优惠网 建站教程 windows server 2012 r2 服务器部署tp6 项目 https://www.kuaiidc.com/67469.html

相关文章

发表评论
暂无评论