install ssl

  • | 481 points

    How can I install ssl on laragon and use my local url as "https://localhost:8000"? @leokhoa @condemned @codebyray

  • administrators
    | 135161 points

  • | 481 points

    I have updated my laragon version. but still its not working for me . You can see in the attachment. It still starts as "http;//localhost:8000" @leokhoa


  • | 2354 points

    Hi @Muhammad-Yousaf

    if you want to use https://localhost
    you can edit this file

    then add virtual host to detect port 443 (ssl)

    <VirtualHost default:443>
    <Directory "C:/laragon/www/">
    AllowOverride All
    Require all granted

    SSLEngine on
    SSLCertificateFile      C:/laragon/etc/ssl/laragon.crt
    SSLCertificateKeyFile   C:/laragon/etc/ssl/laragon.key


    the setting above might need to be adjusted to your setup.

    But not sure if you want https on port 8000, maybe you can change the port to 8000 for ssl and possibly require more adjustment on another ssl setting.

  • administrators
    | 135161 points

    @Muhammad-Yousaf : Why did you use php artisan serve? It will not work.

    From the image, your Apache still served on port 443, just change the HTTPS port in Menu > Ports & Services to 8000,

    Then in your browser, you can access: https://localhost
    for your project, you should browser:

  • | 481 points

    @mdennisa said

    Actually I have to use facebook oauth api to login the users. but every time i make a call they send an error "Insecure login blocked" this is due to i'm sending the request from "HTTP" and not "HTTPS". That is the reason I have to change my url from "http://localhost" to "https://localhost"

  • | 481 points

    @leokhoa @mdennisa

    I 've don the steps
    but still there are some problems and it is not working properly. 0_1535535016468_port.PNG 0_1535535118722_privacy errors.PNG 0_1535535149595_ca4.PNG

  • administrators
    | 135161 points

    @Muhammad-Yousaf : Chrome may cache wrong cert. Just try another browser.

    If it doesn't work, try Menu > Apache > SSL > Add to Trust Store

  • | 481 points


    Now it is also giving me this ERROR . The httpd-ssl conf file is as

  • | 481 points

    @leokhoa @mdennisa
    Thanks alot you guys. finally I have done it. Actually I was using laragon in really old fashion way like wamp or xammp by running ('PHP artisan serve') but in the en finally i get it. Laragon is really cooool !!!!!!!!!!!!!!0_1535623071689_https.PNG

  • administrators
    | 135161 points

    @Muhammad-Yousaf : I am so glad to hear you sorted it out!
    Yes, you'll find no system is easy to like Laragon - especially the SSL feature : )

  • | 401 points

    @leokhoa but i have done nothing else except replace the files from ssl directory and still nothing. what can i do to make it work? i even restarted the pc and apache but no success. this after i send it to trusted store. i have letsencrypt wildcard keys.

  • | 707 points

    @leokhoa I'm having some trouble here, too. I've been able to get SSL working for https://localhost, but not for any of the sites I actually work on. I've enabled SSL via Laragon's menu, and I've added the certificate to the trust store.

    When I'm working on a site locally, I like to have it setup with its own domain. So I add an entry to my hosts file, and I setup the vhost in my Apache vhosts conf file.

    Hosts file: testsite.local

    Vhosts conf file:

    <VirtualHost *:80>
        DocumentRoot "C:\laragon\www\testsite"
        ServerName testsite.local
        ErrorLog "C:\laragon\log\apache\sites\testsite.local_error.log"
        CustomLog "C:\laragon\log\apache\sites\testsite.local_access.log" common
    <VirtualHost *:443>
        DocumentRoot "C:\laragon\www\testsite"
        ServerName testsite.local
        ErrorLog "C:\laragon\log\apache\sites\testsite.local_error.ssl.log"
        CustomLog "C:\laragon\log\apache\sites\testsite.local_access.ssl.log" common
        SSLEngine on
        SSLCertificateFile C:/laragon/etc/ssl/laragon.crt
        SSLCertificateKeyFile C:/laragon/etc/ssl/laragon.key

    But when I open up https://testsite.local, I get an error message:


    Which I guess makes sense, as I'm guessing the SSL certificate Laragon comes with is intended to be used for the localhost domain, and not the testsite.local domain.

    I have the option 'Auto virtual hosts' disabled for my own reasons, but I'd still like to setup sites locally to use SSL (especially when I'm working on an e-commerce site). Can I generate SSL certificates somehow? And how would I add my own certificates to the trust store?

  • administrators
    | 135161 points

    @pixelbrad : Laragon can help you have SSL for localhost and other local domains. Because you disable "Auto virtual hosts", some automation fuctions did not work.
    You can enable it again to let it solves the SSL issue for you, then disable it.

  • | 2354 points

    Hi @pixelbrad
    just in case you need specific SSL for https protocol in local development

    1. you can create a self signed-in certificate via
      add DNS for your local domain
    2. open cert.mgr, add your cert in trusted root certificate
    3. add your local domain to hosts file
    4. test in your browser using https://

    for a side note,
    when you activate SSL via Laragon, it will automate all the process in your PC.

  • | 707 points

    Thank you for your replies, I'll try my luck with these solutions.

  • | 707 points

    @mdennisa Thank you for linking me to that tool. Complete game-changer right there. Not only did that work for me, I can share this with the rest of my team, including those who aren't on Windows.

  • | 2354 points

    Glad to hear that.

    it will be different to set it up on mac os x though, but I think you can do it on your own :)

    big thanks to Laragon founder, I'm just helping the community who loves Laragon :)

  • | 76 points

    This really helped a lot. I was having this problem since morning, tried many things also tries reinstalling several times, but this worked pretty well in first time. I think this problem appeared after moving to windows 11 else it was working fine in windows 10.

    Thank You.
    Have a great day, cheers !!!

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.