如何在本地主机上允许HTTPS for Apache?

我被要求在本地主机上的Apache上使用自签名证书设置HTTPS,但实际上我该怎么做?我一点都不知道



蝴蝶不菲
浏览 802回答 3
3回答

慕虎7371278

这是最简单的方法首先将这些server.crt和server.key文件(在附件中找到)复制到您的apache / conf / ssl目录中然后打开httpd.conf文件并添加以下行Listen 80Listen 443NameVirtualHost *:80NameVirtualHost *:443<VirtualHost *:443>&nbsp; &nbsp; DocumentRoot "d:/wamp/www"&nbsp; #your wamp www root dir&nbsp; &nbsp; ServerName localhost&nbsp; &nbsp; SSLEngine on&nbsp; &nbsp; SSLCertificateFile "d:/wamp/bin/apache/Apache2.4.4/conf/ssl/server.crt"&nbsp; &nbsp; SSLCertificateKeyFile "d:/wamp/bin/apache/Apache2.4.4/conf/ssl/server.key"</VirtualHost>
打开App,查看更多内容
随时随地看视频慕课网APP