How to switch to https
-
Hello,
In Laragon I clicked on Apache>>SSL>>enabled
What else do I need to add a https to my test site please as when I type the laravel site with https in the front (I have set https in my .ENV file), I get this:
This site can’t be reached
mynewproject.dev refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSEDThanks
-
@Ben-Riv : Can you check if Apache's SSL port is enabled in Menu > Preferences > Services & Ports?
-
thanks for the reply.
Yes apache port 443 ssl is enabled.(ticked)
-
ok got it, I had to restart apache for it to work.
I do get a lot ot warnings that the connection is insecure in Chrome, is this normal?
Is it because the certificate is local, any idea please?
-
@Ben-Riv : @Kurre's post will help you:
https://forum.laragon.org/topic/106/laragon-and-let-s-encrypt/3
-
@leokhoa thanks, super helpful
-
You can use middleware class to enable force https redirect. You can follow this tutorial on Laravel https guide to know how to do it.