Let's take a look at the simple server configuration that we already have in place.
So far we've configured the port this server will be listening on and the root directory where the files
for our site will be stored.
Now let's edit the file and add a few more directives.
First, let's add the default underscore server directive to the listen statement because Engine X can
serve multiple files from the same IP address.
We can use the default underscore server statement to tell engine X to use this server configuration
if no other configurations match the name of the site being requested, which leads to the next item.
We need to add the name of the server, which is also the name of the site.
If you're familiar with Apache V host configurations, this is similar to setting up a name base the
host by including the server name by Boxcar Local and w w w dot byte box local.
We let engine X know which sites the server configuration applies to.
Otherwise, if we were serving multiple sites from the same IP address, engine X might serve the wrong
content.
For more information on how engine X matches server names when the request is received, take a look
at the engine x documentation page.
How engine X processes a request.
Now let's add our next directive index.
The index Directive tells engine X what file to use when it responds to a request.
In this case, we're telling Engine X to look for a file named index HTML, which is already the default.
We can add other names to this directive and engine X will look for them in the order in which they
are listed.
So if the index file will be index HTM or index PHP, we can add those and engine x will use the first
one that matches in the root directory.
Now let's test the updated configuration to make sure we didn't introduce any errors.
For that we'll use engine x dash TX again.
And with no errors, we can go ahead and reload the configuration with sys CTL.
Reload engine x.
We didn't get any errors from our system.
CTL, reload command.
So let's go ahead and test the site instead of going to the browser.
I'll just use kernel localhost.
And there's our message site coming soon.
So everything's working as planned.
Now we can move on to adding the website files.