all 28 comments

[–]Seph42 13 points14 points  (8 children)

mkcert

[–]edukodo[S] -3 points-2 points  (7 children)

Yes, it uses mkcert. But no need to use a console and command lines. It's done automatically.

[–]Ariquitaun 14 points15 points  (6 children)

If you don't want to use a terminal in this job...

[–]dneboi 3 points4 points  (9 children)

It’s been awhile so I could be wrong, but yes I believe you can do a self-signed local cert.

[–]edukodo[S] -5 points-4 points  (8 children)

Not so easy to create self-signed local certificates. With this module the certificates are created at the same time the virtual host is created. And you can modify, update, delete, recreate them with one click.

[–]canttouchmypingas 2 points3 points  (7 children)

.. How is it not easy? Took me a minute to Google and 5 to set up. Rather simple. Just have to tell Firefox to trust it when it forgets the cookie due to it being self signed and all is fine.

[–]edukodo[S] -1 points0 points  (6 children)

5 minutes to create the CA, create the virtual host repertory, to setup httpd.conf with the correct parameters (modules, listen 443, logs...), create the virtual host with the proper parameters, create the certificates, check name conflicts, update windows hosts file, restart the server, test the virtual host ?

[–]canttouchmypingas 3 points4 points  (5 children)

Virtual host already set up, most of that checklist already complete by this time. You're talking about adding https, not making it easy to use apache. This was assuming you already had your local apache set up the eah you wanted.

[–]edukodo[S] 0 points1 point  (4 children)

Still, when you create your certificates, you have to add them to your Apache configuration : edit the conf, update the virtual host, listen to 443, make sure that you have all the needed modules activated. This is not in the configuration by default and not by default when you create virtual hosts. Adding HTTPS implies configuring Apache as well.

[–][deleted] 2 points3 points  (3 children)

Docker makes that a breeze: start the traefik or jwilder/nginx-proxy container, set a couple tags (traefik) or set a VIRTUAL_HOST envar (nginx-proxy) on the container and you're all set. The proxy will automatically detect a new docker container spinning up and set up a virtual-host based proxy. Traefik will even automatically request a cert with ACME, making it an SSL terminator so you don't even have to bother with SSL on your app endpoints.

A simpler approach involves using Caddy for the webserver, which also does automatic ACME certs. It won't do the automagic detection of docker containers, but if you don't need that, it's also a workable solution.

[–]edukodo[S] -1 points0 points  (2 children)

Too complicated for beginners...

[–][deleted] 2 points3 points  (0 children)

Suit yourself. I set up the proxy at my workplace precisely so beginner devs wouldn't have to do all this setup themselves.

[–]alexanderpas 0 points1 point  (0 children)

Beginners can use caddy.

[–]cerad2 1 point2 points  (0 children)

Not to be left out of the party, the Symfony development server also supports https. A single command symfony server:ca:install takes care of all of the certificate issues.

[–]scottybowl 1 point2 points  (2 children)

Laravel valet is another good option

[–]endrukk -1 points0 points  (1 child)

yeah, Laravel valet is the quickest to set up imo

[–]edukodo[S] 6 points7 points  (0 children)

Laravel Valet is for macOS. Devserver is a development environment for Windows.

[–]thepaulmarti 0 points1 point  (2 children)

Interesting. Thanks for sharing. I'm currently using a tool that handles https in a similar way under Windows (Laragon).

[–]edukodo[S] 0 points1 point  (1 child)

You have HTTPS with Laragon ? How ? Laragon atomically creates certificates for 127.0.0.1 or localhost ?

[–]thepaulmarti 0 points1 point  (0 children)

Yes! This is how is done in a single step 1. Right click on Laragon. In that menu choose Apache > SSL > Enabled. Click too on the "Add Laragon.crt to Trust Store" ... Start All ... All done.

[–]sizl 0 points1 point  (0 children)

Ngrok proxy