在本地Laravel Homestead服务器上验证自签名证书

编程入门 行业动态 更新时间:2024-10-24 08:32:05
本文介绍了在本地Laravel Homestead服务器上验证自签名证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我遵循以下有关创建SSL证书的详细信息,因此我可以使用https通过Laravel的Homestead运行本地测试站点.

I followed the following details on creating an SSL certificate, so I can run local test sites via Laravel's Homestead, using https.

在homestead vm上添加https证书

一切正常,但是通过 查看测试域时,我在Chrome的地址栏上看到一个红叉.它说证书是不信任的,因为它是自签名的,并且未经第三方验证.

All is well but when viewing the test domain over , I get a red cross on Chrome's address bar. It says that the certificate is untrusted due to being self-signed and not verified by third-party.

有没有一种方法可以解决这个问题?这样我就可以让我的HTTPS本地域受到Chrome的信任,并可以像在线一样工作?

Is there a way that I can sort this out? So that I can get my HTTPS local domains to be trusted by Chrome and work as if online?

推荐答案

Chrome不再允许您导出证书.您需要使用其他支持此功能的浏览器(例如firefox),或者只需将生成的证书从您的宅基地机器复制到共享目录,即可在钥匙串中导入并信任它.

Chrome does not allow you to export the certificate anymore. You need to either use another browser that supports this feature (e.g. firefox) or just simply copy the generated certificate to the shared directory from your homestead machine, so then you can import and trust it in the keychain.

# where I share all homestead certs with the host machine mkdir /home/vagrant/Code/.certs/ cp -vf /etc/nginx/ssl/homestead.app.cert /home/vagrant/Code/.certs

在本地主机上,打开证书文件并将其导入到系统钥匙串.导入后,将其打开并将其信任级别设置为始终信任" .

On your local host machine, open the certificate file and import it to the System keychain. Once imported, open it and set its trust level to "Always trust".

重新启动Chrome即可完成.

Restart Chrome and you're done.

更多推荐

在本地Laravel Homestead服务器上验证自签名证书

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

发布评论

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

>www.elefans.com

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