WEBVTT

00:02.970 --> 00:07.410
Let's take a look at the simple server configuration that we already have in place.

00:07.800 --> 00:13.380
So far we've configured the port this server will be listening on and the root directory where the files

00:13.380 --> 00:14.970
for our site will be stored.

00:15.240 --> 00:18.420
Now let's edit the file and add a few more directives.

00:26.560 --> 00:32.620
First, let's add the default underscore server directive to the listen statement because Engine X can

00:32.620 --> 00:35.430
serve multiple files from the same IP address.

00:35.440 --> 00:40.780
We can use the default underscore server statement to tell engine X to use this server configuration

00:40.780 --> 00:46.690
if no other configurations match the name of the site being requested, which leads to the next item.

00:46.690 --> 00:51.220
We need to add the name of the server, which is also the name of the site.

00:51.520 --> 00:57.180
If you're familiar with Apache V host configurations, this is similar to setting up a name base the

00:57.190 --> 01:03.970
host by including the server name by Boxcar Local and w w w dot byte box local.

01:03.970 --> 01:08.260
We let engine X know which sites the server configuration applies to.

01:08.590 --> 01:14.260
Otherwise, if we were serving multiple sites from the same IP address, engine X might serve the wrong

01:14.260 --> 01:15.070
content.

01:15.400 --> 01:20.890
For more information on how engine X matches server names when the request is received, take a look

01:20.890 --> 01:23.260
at the engine x documentation page.

01:23.260 --> 01:25.870
How engine X processes a request.

01:26.050 --> 01:28.750
Now let's add our next directive index.

01:29.140 --> 01:34.060
The index Directive tells engine X what file to use when it responds to a request.

01:34.420 --> 01:41.110
In this case, we're telling Engine X to look for a file named index HTML, which is already the default.

01:41.440 --> 01:46.060
We can add other names to this directive and engine X will look for them in the order in which they

01:46.060 --> 01:46.840
are listed.

01:47.200 --> 01:54.910
So if the index file will be index HTM or index PHP, we can add those and engine x will use the first

01:54.910 --> 01:56.920
one that matches in the root directory.

01:57.250 --> 02:02.260
Now let's test the updated configuration to make sure we didn't introduce any errors.

02:02.590 --> 02:05.770
For that we'll use engine x dash TX again.

02:06.040 --> 02:10.870
And with no errors, we can go ahead and reload the configuration with sys CTL.

02:10.870 --> 02:12.250
Reload engine x.

02:18.610 --> 02:20.680
We didn't get any errors from our system.

02:20.710 --> 02:22.230
CTL, reload command.

02:22.240 --> 02:26.750
So let's go ahead and test the site instead of going to the browser.

02:26.770 --> 02:28.870
I'll just use kernel localhost.

02:29.230 --> 02:31.570
And there's our message site coming soon.

02:31.900 --> 02:34.120
So everything's working as planned.

02:34.390 --> 02:37.450
Now we can move on to adding the website files.
