最新公告
  • 欢迎您光临源码资源下载站,一个优质的网站源码和小程序源码分享基地。
  • 云服务器UPUPW Apache PHP5.4 版配置SSL域名证书

    正文概述 服务器教程   2023-12-18 16:49:10  
    UPUPW是Windows下很有特色的一款免费服务器PHP套件,又分为纯命令行版本和ANK界面版(通过网页登录控制的版本)。

    这次遇到的是 UPUPW Apache PHP5.4 是个纯命令行版本。客户在我司云主机安装了这个版本,又购买了SSL证书,但是不会安装。

    说实话,我们也是第一次接触这个程序,以前都是IIS或者宝塔之类的有自动导入SSL的功能。

    命令行这个需要修改 Apache 的配置信息。查了下网上的很多教程,说实话,都不怎么完整。

    因此即便按要求







    1.修改目录/Apache2/conf/下的httpd.conf

    将#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

    去掉注释:loadModule socache_shmcb_module modules/mod_socache_shmcb.so

    将#LoadModule ssl_module modules/mod_ssl.so

    去掉注释:LoadModule ssl_module modules/mod_ssl.so

    将#Include conf/extra/httpd-ssl.conf

    去掉注释:Include conf/extra/httpd-ssl.conf

    保存并退出httpd.conf。







    然后在 upupw/apache2/conf/httpd-vhosts.conf 里添加了代码






    DocumentRoot "C:/xx8/m"
    ServerName lam.xx8.top:443
    ServerAlias lam.xx8.top
    ServerAdmin webmaster@lam.xx8.top
    DirectoryIndex index.html index.htm default.html default.htm index.php default.php app.php u.php
    ErrorLog logs/lam.xx8.top-error.log
    CustomLog logs/lam.xx8.top-access_%Y%m%d.log comonvhost

    SSLEngine on
    SSLCertificateFile "sslroot/lam_xx8.top.crt"
    SSLCertificateKeyFile "sslroot/lam_xx8.top.key"
    SSLCertificateChainFile "sslroot/lam_xx8.top.ca"
    #ProtocolsHonorOrder on
    #Protocols h2 h2c http/1.1

    SSLOptions +StdEnvVars
    AllowOverride All
    Require all granted


    Require all denied







    然后到命令行里 rr 重启apache ,结果却是无任何效果。

    -----------------------------------------------------------------------------------------------------------

    为了确认一下443端口是否开放, CMD里执行 netstat -an |more 发现并没有443端口开启。

    如果我们的配置没问题,这说明 apache 服务器并未监听 443端口。

    很多教程压根没说这这问题要怎么做。




    有两种方式开启443端口监听。请认选其一,不要两者都做,会端口冲突的。




    其一:编辑 C:upupwApache2confextrahttpd-ssl.conf

    最后面加入一行 Listen 443 保存后 RR重启




    其二:按upupw的正常流程,确保 :upupwApache2confhttpd.conf里的

    #Include conf/httpd-listen.conf 改成 Include conf/httpd-listen.conf
    然后编辑 httpd-listen.conf

    确保里面的 #Listen 443 改为 Listen 443

    然后也是 RR重启




    这样完成后 443端口就正常监听了,绑定SSL证书的域名也能正常访问了。

    NICE,恒爱网络 秉承客户至上的原则,有问必答,将全心全意为您服务!

    注意,windows防火墙里要放行 443端口,不然外网无法访问。


    云服务器UPUPW Apache PHP5.4 版配置SSL域名证书
    皓玉源码网,一个优质的源码资源平台!
    皓玉源码网 » 云服务器UPUPW Apache PHP5.4 版配置SSL域名证书