apache开启https

编程入门 行业动态 更新时间:2024-10-11 11:15:24

<a href=https://www.elefans.com/category/jswz/34/1769910.html style=apache开启https"/>

apache开启https

本文基于windows平台。

个人感觉使用apache配置起来比较繁琐,而使用upupw或者xmpp等集成开发工具更方便。

  1. 在httpd.conf中,将下一行的注释去掉:LoadModule ssl_module modules/mod_ssl.so。另外,千万不要注释掉下面的一行:Include conf/extra/httpd-ssl.conf。具体原因不明。
  2. 在httpd-vhosts.conf中添加如下代码:
Listen 443
<VirtualHost _default_:443>ServerName aaServerAlias aaSSLEngine onSSLProxyEngine onSSLCertificateFile "D:/UPUPW/Apache2/conf/server.crt"SSLCertificateKeyFile "D:/UPUPW/Apache2/conf/server.key"DocumentRoot "D:/UPUPW/htdocs"DirectoryIndex index.html index.htm index.php default.php app.php u.php<Directory "D:/UPUPW/htdocs">Options FollowSymLinksAllowOverride AllRequire all granted</Directory>
</VirtualHost>

注意:上述DocumentRoot和Directory字段的值要填写正确,https证书和私钥放在conf目录下,文件名也要填写正确。

  1. apache执行httpd -k restart重启apache即可。

更多推荐

apache开启https

本文发布于:2023-12-06 23:29:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1669338.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:apache   https

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!