在 xampp mac 上设置 SSL 证书 [英] Setup an SSL certificate on xampp mac
问题描述
我已经下载了xampp for mac,安装并购买了ssl证书,但是我很难
I have downloaded xampp for mac, installed it and bought ssl certificat, but i'm having hard
安装 ssl 的次数...
times to install the ssl...
- 有懂电脑的人可以一步一步地向我解释一下,如何简单地设置它?请给我
搜索了谷歌,但无法理解他们的做法,请慢慢来
searched google, but could not understand the way they did, please take your time to
解释...
推荐答案
启用 SSL 需要编辑的文件是 conf/extra
中的 httpd-ssl.conf
代码>目录.
The file you need to edit to enable SSL is httpd-ssl.conf
found in the conf/extra
directory.
更改以下指令:
SSLCertificateFile
到domain_com.crt
SSLCACertificateFile
到PositiveSSLCA2.crt
SSLCertificateKeyFile
到您在创建 CSR 时收到的私钥文件
SSLCertificateFile
todomain_com.crt
SSLCACertificateFile
toPositiveSSLCA2.crt
SSLCertificateKeyFile
to the private key file you received when you created the CSR
- 打开Terminal"并输入:
sudo nano/private/etc/hosts
然后添加127.0.0.1 your_domain.com
和127.0.0.1 www.your_domain.com
,编辑完hosts文件后,按control-o保存文件.
- Open " Terminal " and type:
sudo nano /private/etc/hosts
then add127.0.0.1 your_domain.com
and127.0.0.1 www.your_domain.com
, when done editing the hosts file, press control-o to save the file.
然后调用 sudo/Applications/XAMPP/xamppfiles/xampp enablesl
在 httpd.conf 中启用 SSL 并重启 Apache.现在尝试访问 https://localhost
Then call sudo /Applications/XAMPP/xamppfiles/xampp enablessl
to enable SSL in httpd.conf and restart Apache. Now try accessing https://localhost
这篇关于在 xampp mac 上设置 SSL 证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!