apache - 为 XAMPP 配置 SSL

标签 apache ssl xampp

我有一个使用 SSL 的 wordpress 项目,我想在 XAMPP 上运行它。

我修改了我的 httpd-vhosts.conf 和我的 httpd-ssl.conf 来为这个特定的 wordpress 项目创建一个虚拟主机。

这是我的 httpd-vhosts.conf 文件内容

<VirtualHost *:443>
    DocumentRoot "D:/xampp/htdocs/wordpresssoftd"
    ServerName mysite.local
    ServerAlias mysite.local
    SSLEngine on
    SSLCertificateFile conf/ssl.crt/server.crt
    SSLCertificateKeyFile conf/ssl.key/server.key 
    <Directory "D:/xampp/htdocs/wordpresssoftd">
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

wordpresssoftd 包含我的项目文件。

我还重命名了 httpd-ssl.conf 中的文档根目录。

当我运行网站时,没有加载 CSS 和 JS 文件,但是 wordpress 站点的索引页面在没有 CSS 和 JS 的情况下提供。

I have added screenshot from Google Chrome Web Inspector

我已经检查过这些链接无济于事

Enabling SSL with XAMPP

Setting up SSL on a local xampp/apache server

How do I use https (SSL) in XAMPP while using virtual hosts

http://www.leonardaustin.com/blog/technical/how-to-enable-ssl-on-xampp-with-vhosts/

https://jaswanttak.wordpress.com/2010/04/15/configure-ssl-on-xampp-and-windows/

最佳答案

解决了。一切设置正确。

而不是使用

访问我的网站
https://localhost/wordpresssoftd

我用过

https://localhost

关于apache - 为 XAMPP 配置 SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38153453/

相关文章:

ssl - Erlang 获取 SSL 连接在内存中的确切大小

php - 我如何使用 php 和 mysql 上传音乐

php - 如何在我自己的本地 PHP 服务器上造成拒绝服务?

php - 如何将 htdocs 更改为 XAMPP 中的不同目录?

regex - apache HTTP :X-Forwarded-Proto in . htaccess 在开发环境中导致重定向循环

apache - chrome 不信任 https 并显示 ERR_SSL_SERVER_CERT_BAD_FORMAT

php - 如果找不到,我们如何使用 Apache 重定向到新的 HTML 静态内容并回退到旧的基于 CMS 的 PHP 版本? (nginx try_files)

apache - centos 更新 httpd 后 SSL 不起作用

python - 在 supervisord 下运行 python 时证书验证失败

ios - 要求客户端证书是否能有效消除 MITM 攻击?