docker-magento
docker-magento copied to clipboard
Invalid SSL Ubuntu 22.04
Description
I tried many times to run the bin/setup-ssl {domain}
script but no matter what, it never seems to generate a valid certificate.
Maybe this is because of an old "certutil" certificate that is still present on my computer somehow? I don't really know.
Steps To Reproduce
- Install an existing project with the domain
thesages.test
- Run the
bin/setup-ssl thesages.test
command
Expected Result
- The frontend SSL is valid
Actual Result
- The frontend SSL is invalid
Here are screenshots of everything from Chrome and Firefox if it can help:
- Chrome error page detail:
- Chrome certificate details:
- Firefox error page detail:
- Firefox certificate details:
-
bin/setup-ssl thesages.test
output:
-
bin/setup-ssl-ca thesages.test && bin/setup-ssl thesages.test
output:
Thanks for your time.
@Axel29 Try import rootCA.pem to firefox: Settings -> Privacy & Security -> Certificates ->View Certificates -> Authorities -> Import and select rootCA.pem witch must located in ~/Sites/thesages/ after execute command bin/setup-ssl thesages.test. Work for me on Arch
@Axel29 Try import rootCA.pem to firefox: Settings -> Privacy & Security -> Certificates ->View Certificates -> Authorities -> Import and select rootCA.pem witch must located in ~/Sites/thesages/ after execute command bin/setup-ssl thesages.test. Work for me on Arch
Indeed it worked for me, even for Chrome, thanks a lot!
If someone is looking at this, here's how to do it on Chrome:
- Go to Settings > Privacy and security > Security > Manage certificates > Authorities
- Click "Import"
- Import your
rootCA.crt
file, it should be in/usr/local/share/ca-certificates/rootCA.crt
Although this method works, it would be great if we could have a fix for the script that would work out of the box, without requiring manual imports like that.
@Axel29 Try import rootCA.pem to firefox: Settings -> Privacy & Security -> Certificates ->View Certificates -> Authorities -> Import and select rootCA.pem witch must located in ~/Sites/thesages/ after execute command bin/setup-ssl thesages.test. Work for me on Arch
Indeed it worked for me, even for Chrome, thanks a lot!
If someone is looking at this, here's how to do it on Chrome:
- Go to Settings > Privacy and security > Security > Manage certificates > Authorities
- Click "Import"
- Import your
rootCA.crt
file, it should be in/usr/local/share/ca-certificates/rootCA.crt
Although this method works, it would be great if we could have a fix for the script that would work out of the box, without requiring manual imports like that.
I installed magento2.4.6 on vps (ubuntu 22.04), according to your method, the SSL problem is still not resolved.
It'd be nice to get a confirmation from someone that the suggested fix does indeed work. If it does, we should definitely get this added to the readme!
I see a lot of people are confused about mkcert, because it doesn't work. Especially most Ubuntu users. The best solution is to remove mkcert, and install the Let's Encrypt SSL Certificate.
I hope mark can make a tutorial to make it easier for more people to use magento, right? :)
@Axel29 Try import rootCA.pem to firefox: Settings -> Privacy & Security -> Certificates ->View Certificates -> Authorities -> Import and select rootCA.pem witch must located in ~/Sites/thesages/ after execute command bin/setup-ssl thesages.test. Work for me on Arch
Indeed it worked for me, even for Chrome, thanks a lot!
If someone is looking at this, here's how to do it on Chrome:
- Go to Settings > Privacy and security > Security > Manage certificates > Authorities
- Click "Import"
- Import your
rootCA.crt
file, it should be in/usr/local/share/ca-certificates/rootCA.crt
Although this method works, it would be great if we could have a fix for the script that would work out of the box, without requiring manual imports like that.
For me this worked in Brave on Ubuntu 22.04
Hello @markshust Thank you for this beautiful docker tool for Magento.
I fixed it on my local like this: Open Settings -> Privacy and security -> Security -> Manage device certificates -> Authorities And import Sites/magento/rootCA.pem
May be needed to restart the browser and/or project.
My setup is: Ubuntu 23.04 Chrome 117
Alternatively, you can disable the SSL check for localhost:
chrome://flags/#allow-insecure-localhost
Hello @markshust Thank you for this beautiful docker tool for Magento.
I fixed it on my local like this: Open Settings -> Privacy and security -> Security -> Manage device certificates -> Authorities And import Sites/magento/rootCA.pem
May be needed to restart the browser and/or project.
My setup is: Ubuntu 23.04 Chrome 117
Thank you, solved it for me. Headache finally over
Thanks for the updates. I'd love to take in a PR which adds this to the readme or CLI command after running this on Linux!