SSL certificate on local Laradock Nginx project

試著忘記壹切 提交于 2020-11-29 09:26:48

问题


I need your help to set my Laradock (with Docker) using Nginx and SSL "fake" certificate on my local machine.

I have no idea how to setup it. Could you please help me?

Thanks


回答1:


To enable SSL with the current version of laradock (as of Nov 2019) with a self signed certificate you must enable it in the nginx settings. Inside the folder nginx/sites remove the comments below line 6 "# For https" :

# For https
listen 443 ssl default_server;
listen [::]:443 ssl default_server ipv6only=on;
ssl_certificate /etc/nginx/ssl/default.crt;
ssl_certificate_key /etc/nginx/ssl/default.key;

restart nginx : docker-compose restart nginx and you're ready.

If google-chrome complains you can enable the flag at chrome://flags/#allow-insecure-localhost to allow even invalid certificates.



来源:https://stackoverflow.com/questions/58904510/ssl-certificate-on-local-laradock-nginx-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!