Playing
06. Enabling SSL

Transcript

00:00
We're going to want to make sure we enable SSL for our WebSocket subdomain.
00:03
So let's do that now, as well as assigning a certificate to our main domain as well. So we're going to head over to the SSL section under our site, and we're going to use Let's Encrypt to create out a certificate for the ws.alex.gs domain and the main domain as well.
00:20
I'm going to get rid of the www one here because I'm not using that as a CNAME record, and we're going to click obtain certificate. Now, just before we do that, I have SSL enabled over on Cloudflare, which sometimes gets in the way of assigning this certificate.
00:34
So I'm going to temporarily change this to off. And then once we do have this assigned, we're going to turn this back on. Let's go back over to Forge and click obtain certificate. And really, we're just going to wait for this to happen.
00:47
Sometimes you'll get issues here, but Forge will give you a list of suggested steps and you'll be able to see the output as well. So you can go ahead and tweak anything to get this running. Okay.
00:57
It looks like that was successful and the certificate is just activating. So once that's done, we should have SSL enabled. Great. Okay.
01:05
I'm going to go back over to Cloudflare and set this to full SSL. And once we've done that back over in our application, this should now be a secure application. And you can see sure enough it is.
01:15
It will also be the case for our ws sub domain as well. So now we can go ahead and configure this to hook up to a completely different scheme and port. Let's go back over to our environment section and we'll update our environment
01:29
file here to point to a completely different port and scheme for us. We want the port to be 443 and we want the scheme now to be HTTPS. Let's go ahead and run this with a config cache clear and hit save on this, and we should be good.
01:46
Now at the moment, this is still not going to work. There's a crucial step to getting this now working within our application. Let's head over to the next episode and make sure that our reverb server gets restarted and also we rebuild our assets.
7 episodes 16 mins

Overview

So you’ve built a realtime application. Now it’s time to deploy it.

Laravel Forge makes it incredibly easy to toggle Reverb, which configures your server for you and sets up (nearly) everything you need to broadcast and listen for events.

In this course, we’ll cover every step needed to get an local example application deployed to a production server, with a separate subdomain reserved for your Reverb connections.

Alex Garrett-Smith
Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Comments

No comments, yet. Be the first to leave a comment.