专业网站设计定制,html5网页制作成品,门户网站建设的步骤,做装修行业营销型网站本次实验背景#xff1a; 完全参考官方 https://cloud.tencent.com/document/product/400/4143 文档流程#xff0c;没有搞定#xff0c;于是写下避坑之作。
服务器#xff1a;腾讯云轻量应用服务器 操作系统#xff1a; Windows Server 2022 DataCenter 64bit CN apache…本次实验背景 完全参考官方 https://cloud.tencent.com/document/product/400/4143 文档流程没有搞定于是写下避坑之作。
服务器腾讯云轻量应用服务器 操作系统 Windows Server 2022 DataCenter 64bit CN apache版本Apache 2.4.59
证书下载及存放
下载证书 这里完全按照官方的来 证书存放 如下图所示为方便管理和引用我在服务器的conf下新建了目录ssl把需要用到的三个证书除CSR外放到这里
一、开启ssl配置文件
使用文本编辑器打开 Apache 服务器 conf 目录下 httpd.conf 文件并删除以下字段前 # 注释符。
#LoadModule ssl_module modules/mod_ssl.so
#Include conf/extra/httpd-ssl.conf2. 将httpd-ssl.conf中虚拟机部分代码注释
二、配置虚拟机
打开Apache24\conf\extra\目录将httpd-vhosts.conf复制一份备份清空httpd-vhosts.conf内容加入下面内容*****包含作者真实域名信息打了马赛克。
VirtualHost *:80DocumentRoot C:\WF\www\html\****Directory C:\WF\www\html\****RewriteEngine onRewriteCond %{SERVER_PORT} !^443$RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]/Directory
/VirtualHostVirtualHost *:443DocumentRoot C:\WF\www\html\****ServerName ****.comServerAlias www.****.com#sslSSLEngine onFilesMatch \.(cgi|shtml|phtml|php)$SSLOptions StdEnvVars/FilesMatchDirectory ${SRVROOT}/cgi-binSSLOptions StdEnvVars/Directory#ssl-keySSLCertificateFile ${SRVROOT}/conf/ssl/****.com.crtSSLCertificateKeyFile ${SRVROOT}/conf/ssl/****.com.keySSLCertificateChainFile ${SRVROOT}/conf/ssl/root_bundle.crt#ssl-key-ENDBrowserMatch MSIE [2-5] \nokeepalive ssl-unclean-shutdown \downgrade-1.0 force-response-1.0# Per-Server Logging:# The home of a custom SSL log file. Use this when you want a# compact non-error SSL logfile on a virtual host basis.CustomLog ${SRVROOT}/logs/ssl_request.log \%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \%r\ %b
/VirtualHost三、测试配置文件重启apache服务
net stop apache
httpd -t
net start apache