Install scoop
Installation under the administrator console has been disabled by default for security considerations. If you know what you are doing and want to install Scoop as administrator. Please download the installer and manually execute it with the -RunAsAdmin
parameter in an elevated console. Here is the example:
irm get.scoop.sh -outfile 'install.ps1' .\install.ps1 -RunAsAdmin [-OtherParameters ...] # I don't care about other parameters and want an one-line command iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
Install symfony cli
scoop install symfony-cli
Install certificate using symfony cli tools
symfony server:ca:install
Install cert manually with
scoop install mkcert
# cd CUSTOM_DIR
mkcert -install
mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1
see more at https://github.com/FiloSottile/mkcert
mkcert automatically creates and installs a local CA in the system root store, and generates locally-trusted certificates. mkcert does not automatically configure servers to use the certificates, though, that’s up to you.
https://github.com/FiloSottile/mkcert
If that did not solve your issue do the fallowing:
After installing docker through docker in README.md file, you will read a basic usage guild line. In step 4 you will can see a link on how to fix the issue with Symfony SSL certificate in local environment:
## Getting Started
1. If not already done, [install Docker Compose] (https://docs.docker.com/compose/install/)
2. Run
docker-compose build --pull --no-cache
to build fresh images3. Run
docker-compose up
(the logs will be displayed in the current shell)4. Open `https://localhost` in your favorite web browser and [accept the auto-generated TLS certificate](https://stackoverflow.com/a/15076602/1352334)
5. Run
srcdocker-compose down --remove-orphans
to stop the Docker containers.
First investigate the info about the certificate installed in Symfony docker installation.
Open Google chrome settigns. In search box type “cert”. Or navigate to chrome://settings/security now click on manage certificates.
See if you can find your certificate on the list. If not you will have to export certificate first and import it to chrome using the window above.
Export Symfony local cert & Import it to Chrome
- On the page with the untrusted certificate (
https://
is crossed out in red), click the lock > Certificate Information. NOTE: on newer versions of chrome, you have to openDeveloper Tools > Security
, and selectView certificate
. - Click the
Details tab > Export
. ChoosePKCS #7, single certificate
as the file format. - Then follow my original instructions to get to the Manage Certificates page. Click the
Authorities tab > Import
and choose the file to which you exported the certificate, and make sure to choosePKCS #7, single certificate
as the file type. - If prompted certification store, choose Trusted Root Certificate Authorities
- Check all boxes and click OK. Restart Chrome.
Next continue with setting up imported cert:
- Using Chrome, hit a page on your server via HTTPS and continue past the red warning page (assuming you haven’t done this already).
- Open up
Chrome Settings > Show advanced settings > HTTPS/SSL > Manage Certificates
.
Or go to (chrome://settings/security > click on “manage certificate button”). - Click the
Authorities
tab and scroll down to find your certificate under the Organization Name that you gave to the certificate. - Select it, click Edit (NOTE: in recent versions of Chrome, the button is now “Advanced” instead of “Edit”), check all the boxes and click OK. You may have to restart Chrome.
You should get the nice green lock on your pages now.
C:\laragon\www\docker\symfony-docker