我在 XAMPP 服务器上安装了 SSL 证书,当我将 httpd-ssl.conf 中的 DocumentRoot 更改为我的项目文件夹时它有效,是的,但是当我输入时http://localhost它会将我重定向到 https://localhost/xampp我有错误。
所以我不会更改 DocumentRoot,只是让 SSL 在实际的 Root 上工作。 我试图更改 httpd-vhost 文件,但没有成功
最佳答案
这很有趣,我发誓我做到了。
我在 httpd-vhost 文件中复制了如下内容:
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
ServerAlias localhost
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
现在一切正常
关于apache - XAMPP SSL 错误 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28366619/