https - 我正在尝试拥有一个 HTTPS 网站,但我被困在教程步骤中
问题描述
我正在将 Xampp 与 Php 一起使用,并且正在尝试将我的 http 网站迁移到 https。
这是我正在尝试做的导师女巫。 https://gist.github.com/nguyenanhtu/33aa7ffb6c36fdc110ea8624eeb51e69
在这里,红色箭头是我卡住的步骤。
这是我的文件的样子。
Virtual Hosts
#
# Required modules: mod_log_config
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
#
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host.example.com
##DocumentRoot "E:/xampp/htdocs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
##</VirtualHost>
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot "E:/xampp/htdocs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
##</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/eFormat/format_01\projet"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
</VirtualHost>
感谢帮助。
解决方案
对于该步骤,您必须编辑您的虚拟主机配置文件并添加 SSL 引擎。
<VirtualHost *>
SSLEngine on
推荐阅读
- function - 如何在片段着色器中添加功能以循环骨骼
- list - Ansible Jinja2 模板将字符串拆分为键值对
- python - 为什么我会收到此消息?= FileNotFoundError: [WinError 3] 系统找不到指定的路径:XXXXX
- c++ - Cmake - include_directory ...但排除一些?
- javascript - 引导 5 模态。在提交时打开一个错误模式,而不是提供返回上一个模式或前进到下一个模式
- python - 从两个不同的表中找到最小值最大值
- r - 分母 自由度 Anova 混合设计 Type III
- kml - 更新 Google KMZ 弹出内容并删除 FME 中的“方向”
- windows - 如何将 Jenkins 管道变量用于 powershell 或 cmd 代码?
- apache-spark - 在连接列的*子集*上分区时,无需随机播放的 Spark 连接