OK, so now to reverse proxy Agraféna with engine.
Now the reason why I want to add a reverse proxy in front of Crafar because the next step I will add
an SSL certificate and open the SSL certificate to the next proxy rather than to the Griffon service
itself.
Also, using a proxy is a common approach to changing the port number of a service running on the internet
in a more generic way, rather than modifying Griffon settings explicitly.
It's a concept that you can use for many other services that you might be hosting on a service.
So anyway, the purpose of this next section is to remove the need of typing in the code and 3000.
So rather than typing that address, which works now that sitake or font become a dot net code 3000,
I would just be able to type in that address.
Hey, Shitbag follows the code on it without the column.
OK, so and for that ability, I'll use engineers.
OK, so switch onto your server.
OK, so I log on to my cabana server that I got from Digital Ocean, and I can first test to see if
Engine X is installed.
It's very unlikely to be in Unix Hyphen V version.
No, it's not there so we can install it so that I'll use that command name.
Just a generic install command for engine.
Yes.
Very good.
Now I can test the version again, if I just press on the up arrow on my keyboard, it shows me the
last commands that I've just typed.
So any next half of the version 1.1?
Excellent.
We can continue so we can check the status.
It should already be running by sudo service engineer status.
And next is actually running a patrol seat to get out of that.
OK, now Engine X by default, is hosting a very simple website on Poor 80, not port three thousand
like Agraféna service.
So if I just type that IP address by itself into my browser and I don't have to put in column port I.D.
like that, it's just default behind the scenes.
Just put the IP address in.
It will show me the default engine next.
Welcome page.
Now, if you're using us as your GCP or any other similar service, you might have to set up a firewall
rule.
So neither of us, I had to.
I put 3000 in the security group.
You have to open up a port in your security group in the equivalent user interface section of your cloud
provider.
But in digitalization and that's not poor, it is accessible by default as long as there's something
on your server exposing Port I.D. and that is Engine X.
Right now it's listening on Port 80.
And if I visit the IP address directly, regardless, if I put in 80 or not, it's going to serve me
just a simple web page.
OK, so now to create a specific configuration for graphic violence, so we can also visit our California
service through Port 80 using HDTV.
OK, so see to the Engine X Sites Enable Folder.
So usually that is ETSI engine.
So it's enabled.
So just copy that whole line, right click CD, ETSI and next.
So it's enabled if I type less, it shows me this one fall in their code default.
That default is instructions that tells Engine X to serve this basic content when someone visits provided
that IP address.
OK, so we're going to add another configuration that will listen for the domain name that we typed
in.
So we'll create New Fault Sudo Nano, whatever your domain name, dconf is.
OK, so before that, I'm just going to clear the screen.
OK, so sudo nano your domain name dconf.
So my domain name is Bafana or ISP code.
Dot net dot com.
You can actually name it anything you like.
I'm just naming it the same as my domain name, so this will create a new file name to that in the site.
Snapped Photo and Nano is a text editor for Linux.
It's quite easy to use.
So enter.
OK, so the text editors opened up so we can now write the contents of this new file.
OK.
So going further down, just copy this section here.
Can use that icon if you like, copied the clipboard now.
Right click and it will paste the contents into the text later today.
So up here for server name change that to follow the recipe code.
Dot net and make sure they've got semicolon at the end.
That will cause the next proxy, which is essentially like a web server.
So to listen on Port 80.
But if the domain name typed in was Crafar s code dot net, it will redirect the TCP connection onto
hasty FTP local host call and 3000.
And that's where Agraféna service is listening to a proxy pass.
So Control X is the option down there.
Control X to save and select, Y to save.
Yes.
OK, so if what type list now, which means list the contents of the folder, it shows this to file's
default and another one Cauca finite Echo Dot net dakonam.
OK, so let's just verify that the configuration is correct and you can do that and x hyphen t test.
OK, so syntax is OK and the artistic successful.
So the syntax of microfinance Beko dot net took off was OK.
So this restart Engine X restart and this check its status.
Very good.
Active running control C to get out of that.
Now, if I open my browser and visit, just that address doesn't matter if I put the housekeeper or
not.
I'll just put that in Gryffindor ESP Code Dot Net, just like that takes me straight to the microphone
application to the microphone and speak code on it is no longer necessary to put in the call and three
thousand.
Just remember, though, this is using default.
Poor it now.
And since I'm using a cloud provider which doesn't force a firewall in front of your service like I
was and several others for it is already accessible now.
If you are using IWC, you'd have to add it to your security group and just so you know, Port 3000
does continue to work.
If you wanted to use that, but it's no longer necessary, signal actually remove that additional rule
from your security group and IWC if you wanted to.
It's not necessary.
But later on, I will create an IP table for all to block Port 3000, but that's in the next video.
Excellent.
So that's what we did in this video.
Remove the need to type and call in three thousand.
So already that's looking much better, but it's still not perfect.
If I look at that, it says not secure.
So in the next video will add an SSL certificate and bind it at the end of next proxy, and we'll be
able to use HTTPS instead of 8TB.
Excellent.