2020最新UPUPW5.4-APACHE搭建HTTPS网站教程
首先申请免费HTTPS证书
免费申请网站: https://freessl.cn/
由于百度和谷歌等搜索引擎提倡开启HTTPS安全传输的链接方式。易采源码网近日也做了HTTPS链接方式。易采源码网采用的是upupw apache版的服务器软件。那么今天分享一下upupw apache版的服务器软件如何开启HTTPS链接。废话不多说,直接上教程。。。。
首先到这里下在upupw apache服务器套件https://down.easck.com/software/33477.html
然后解压到您指定的分区里面比如D:\UPUPW\
第一步:
复制UPUPW目录下面\Apache2\bin\目录下面的 libeay32.dll,openssl.exe,ssleay32.dll这三个文件到您的PHP目录里。
注:原版的UPUPW APACHE版的服务器套件,不论您怎么配置,即使您配置的都正确如果不复制这三个文件也启动不了Apache服务。所以这三个文件目前为止必须复制到PHP目录替换PHP目录里面的相同文件名的文件。
第二步:
上面的三个文件复制好之后
打开Apache2\conf\目录下面的httpd.conf文件
找到这3行
#LoadModule ssl_module modules/mod_ssl.so
#Include conf/extra/httpd-ssl.conf
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
去掉前面的#号,修改成
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
需要注意的是下面这两行代码
Listen 80
Include conf/httpd-listen.conf
如果这两行代码前面有#也请去掉。
然后保存
第三步
然后在打开Apache2\conf\目录下面的httpd-listen.conf文件
您会看到这样的文字
#Listen 81
#Listen 8080
我们增加一行代码
listen 443
变成
#Listen 81
#Listen 8080
listen 443
解释一下,#listen 81和#listen 8080不在服务器端口检测中
增加listen 443是为了让服务器对443端口进行检测和链接
如果您不开启443端口的检测即使您配置正确HTTPS也不能链接
修改好之后后保存
第四步
接下来我们在打开Apache2\conf\extra目录下面的httpd-ssl.conf文件
#
# This is the Apache server configuration file providing SSL support.
# It contains the configuration directives to instruct the server how to
# serve pages over an https connection. For detailed information about these
# directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
#
# Do NOT simply read the instructions in here without understanding
# what they do. They’re here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Required modules: mod_log_config, mod_setenvif, mod_ssl,
# socache_shmcb_module (for default value of SSLSessionCache)
#
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. This means you then cannot use the /dev/random device
# because it would lead to very long connection times (as long as
# it requires to make more entropy available). But usually those
# platforms additionally provide a /dev/urandom device which doesn’t
# block. So, if available, use this one instead. Read the mod_ssl User
# Manual for more details.
#
#SSLRandomSeed startup file:/dev/random 512
#SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random 512
#SSLRandomSeed connect file:/dev/urando