HTTPS in local env with laragon

  • | 420 points

    I have project locally that works only with https.
    How I can configure localhost with laragon for this project. I change 4443 port of SSL to 443 -> redirect on index.php with phpinfo. Another if I don't change defalut ssl port of laragon - 443. f.e in chrome - Unable to access the site.
    Help, please!

  • | 4363 points

    First check that following line is un-commented on httpd.conf (can't remember if it's enabled by default)

    LoadModule ssl_module modules/

    This is what I have in httpd-vhosts.conf (i'm also using HTTP/2):

        Protocols h2 http/1.1
        DocumentRoot "${DOCROOT}/app/public"
        ServerAlias *
        SSLEngine on
        SSLCertificateKeyFile D:/tools/laragon/ssl/
        SSLCertificateFile D:/tools/laragon/ssl/
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

    From Apache2 side, these should be enough to get HTTPS connection,'s been a while since I last time set these up :)
    Also check errors.log for more information if you encounter any weird issues.

    Here is also my short tutorial of how to set up an SSL/TLS certificate with Laragon.

  • | 420 points

    Kurre, thank you for reply.

    1. Are you manually change httpd-vhosts.conf and are you delete default conf in httpd-vhosts.conf of laragon for this project?
    2. In your preferences in laragon SSL port 4443 or 443? Because https-ssl.conf file is configured for 4443 port.

  • | 420 points

    @Kurre , I tried your instruction. I did all. But I have ERR_SSL_PROTOCOL_ERROR

  • administrators
    | 123538 points

    @islamw: You can change Laragon SSL port to 443 in preferences and in httpd-vhosts.conf
    Restart Apache and check if it listen on port 443 (The easiest way to check is open Terminal and type:

    telnet localhost 443

    If it said connected then you can follow @Kurre tutorial.

    PS: In a few days, I will release a new version of Laragon which will make SSL Connection a breeze.

  • | 420 points

    @leokhoa where change 443 in httpd-vhosts.conf?

  • administrators
    | 123538 points

    Sorry, you should change on httpd-ssl.conf

    Listen 443

  • | 420 points

    @leokhoa I got this error

  • administrators
    | 123538 points

    Your 443 port is using by another service (Skype,...) please check and stop it first.

  • | 420 points

    @leokhoa, @Kurre, thank you very much!
    @leokhoa, can I enable skype if apache use 443 port?
    Waiting for the new version of Laragon

  • administrators
    | 123538 points

    @islamw : Sure, you can.

    1. Open Skype > Tools > Options > Advanced > Connection
    2. Uncheck "Use port 80 and 443 for additional incoming connections"
    3. Restart Skype

  • | 420 points

    @leokhoa, thank you!

Log in to reply

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