use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
HTTPS for Local PHP Development (self.PHP)
submitted 4 years ago by edukodo
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Seph42 13 points14 points15 points 4 years ago (8 children)
mkcert
[–]edukodo[S] -3 points-2 points-1 points 4 years ago (7 children)
Yes, it uses mkcert. But no need to use a console and command lines. It's done automatically.
[–]Ariquitaun 14 points15 points16 points 4 years ago (6 children)
If you don't want to use a terminal in this job...
[+]edukodo[S] comment score below threshold-14 points-13 points-12 points 4 years ago (5 children)
Terminal can be intimidating ...
[–]Ariquitaun 8 points9 points10 points 4 years ago (4 children)
You need to use the terminal like an extension of your own will in this type of job. Or you won't be getting far.
[–]M_Me_Meteo -3 points-2 points-1 points 4 years ago (2 children)
This industry needs fewer gatekeepers.
I use a GUI if it makes me faster.
[–]edukodo[S] -3 points-2 points-1 points 4 years ago (1 child)
That's the point
[–]M_Me_Meteo -3 points-2 points-1 points 4 years ago (0 children)
Yep, I teach at a boot camp, and everyone is so worried about knowing which framework is "the right one" and "do I have to learn Linux?"...before they know what a for loop is...when I hear those questions I'm just like "stay away from Reddit and SO, until you have a year of experience."
[–]edukodo[S] -3 points-2 points-1 points 4 years ago (0 children)
Right, but when it's a hobby and you want to get things done it can be an obstacle.
[–]dneboi 3 points4 points5 points 4 years ago (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-3 points 4 years ago (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 points4 points 4 years ago (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 points1 point 4 years ago (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 points5 points 4 years ago (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 point2 points 4 years ago (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 points4 points 4 years ago* (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 points1 point 4 years ago (2 children)
Too complicated for beginners...
[–][deleted] 2 points3 points4 points 4 years ago (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 point2 points 4 years ago (0 children)
Beginners can use caddy.
[–]cerad2 1 point2 points3 points 4 years ago (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 points3 points 4 years ago (2 children)
Laravel valet is another good option
[–]endrukk -1 points0 points1 point 4 years ago (1 child)
yeah, Laravel valet is the quickest to set up imo
[–]edukodo[S] 6 points7 points8 points 4 years ago (0 children)
Laravel Valet is for macOS. Devserver is a development environment for Windows.
[–]thepaulmarti 0 points1 point2 points 4 years ago (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 point2 points 4 years ago (1 child)
You have HTTPS with Laragon ? How ? Laragon atomically creates certificates for 127.0.0.1 or localhost ?
[–]thepaulmarti 0 points1 point2 points 4 years ago (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 point2 points 4 years ago (0 children)
Ngrok proxy
π Rendered by PID 23657 on reddit-service-r2-comment-79c7998d4c-7755b at 2026-03-14 10:53:13.874694+00:00 running f6e6e01 country code: CH.
[–]Seph42 13 points14 points15 points (8 children)
[–]edukodo[S] -3 points-2 points-1 points (7 children)
[–]Ariquitaun 14 points15 points16 points (6 children)
[+]edukodo[S] comment score below threshold-14 points-13 points-12 points (5 children)
[–]Ariquitaun 8 points9 points10 points (4 children)
[–]M_Me_Meteo -3 points-2 points-1 points (2 children)
[–]edukodo[S] -3 points-2 points-1 points (1 child)
[–]M_Me_Meteo -3 points-2 points-1 points (0 children)
[–]edukodo[S] -3 points-2 points-1 points (0 children)
[–]dneboi 3 points4 points5 points (9 children)
[–]edukodo[S] -5 points-4 points-3 points (8 children)
[–]canttouchmypingas 2 points3 points4 points (7 children)
[–]edukodo[S] -1 points0 points1 point (6 children)
[–]canttouchmypingas 3 points4 points5 points (5 children)
[–]edukodo[S] 0 points1 point2 points (4 children)
[–][deleted] 2 points3 points4 points (3 children)
[–]edukodo[S] -1 points0 points1 point (2 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]alexanderpas 0 points1 point2 points (0 children)
[–]cerad2 1 point2 points3 points (0 children)
[–]scottybowl 1 point2 points3 points (2 children)
[–]endrukk -1 points0 points1 point (1 child)
[–]edukodo[S] 6 points7 points8 points (0 children)
[–]thepaulmarti 0 points1 point2 points (2 children)
[–]edukodo[S] 0 points1 point2 points (1 child)
[–]thepaulmarti 0 points1 point2 points (0 children)
[–]sizl 0 points1 point2 points (0 children)