Symfony, the Local Server and a Trusted SSL Certificate in Chrome
Set up a trusted certificate in Chrome for Symfony application development too
When developing Symfony applications, it is very convenient to use the local Symfony server, which can also be set up for HTTPS very easily with the command:
symfony server:ca:install
This command creates a local certificate authority and a local certificate signed by it, tries to register the authority in the system and set it up in Firefox. In other browsers you have to add the authority manually, which fortunately is very simple. In Chrome you can do this in
Settings -> Privacy and security -> Security -> Manage certificates
Here you need to switch to the Authorities tab, click the Import button and locate the corresponding file. On Linux, it is stored at ~/.symfony5/certs/rootCA.pem (expect the number to increase with the Symfony version). If the import ends with a message that the certificate already exists, find it in the list (an entry similar to "org-Symfony dev CA"), click Edit and check where you want it to be trusted – primarily for websites.
After restarting Chrome, your local Symfony applications should show a valid HTTPS certificate as well.