0

Im using laravel with valet, when I acess some site the url is "https://blog.test". Im using localhost for now.

But I would like to have the site with a secure connection. But Im not finding about which is necessary to have a secure connection.

Do you know if it is only nececessary set the url with https like "'url' => env(APP_URL, https://localhost)' in config/app.php? Or it is in the route files that is necessary to change something?

1 Answers1

1

First, you need an SSL certificate, for the server.

Secondly, you need to configure the web server to listen to the 443 port for ssl

And the third one is to change the domain in the .env file

Mike Foxtech
  • 1,633
  • 1
  • 6
  • 7
  • Thanks, do you know if the SSL certificated can be created or is necessary to buy one? –  Apr 12 '18 at 13:43
  • @JakeJ **Apache** https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-16-04 **Nginx** https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-16-04 – Mike Foxtech Apr 12 '18 at 13:48