WEBVTT

00:02.980 --> 00:08.140
Now let's see how to create a server configuration for a demo website using Engine X.

00:08.500 --> 00:14.140
The development Virtual machine is already up and running and I've already elevated privileges by using

00:14.140 --> 00:15.580
sudo su dash.

00:15.940 --> 00:22.390
First we'll remove the default engine x site configuration in the ETSI engine x site's enabled directory.

00:22.720 --> 00:29.800
Then we'll create a new configuration file in the ETSI engine Zukunft directory named by box dot local

00:29.800 --> 00:32.740
dot com for the demo site by box start local.

00:33.040 --> 00:35.020
We'll use them to edit the file.

00:35.410 --> 00:41.830
It's important to name the file after the site and use the dot conf extension so that engine X recognizes

00:41.830 --> 00:43.780
it when reloading the configuration.

00:44.080 --> 00:46.240
We'll also need no more of the V host.

00:46.270 --> 00:49.930
It can be removed or renamed without the dot conf extension.

00:50.410 --> 00:52.330
Let's type the following commands.

00:52.900 --> 00:54.280
Sudo sue dash.

00:54.280 --> 00:58.690
This command switches the current user to the superuser root account.

00:59.050 --> 01:05.290
Sudo is used to run the subsequent command with superuser privileges and su is used to switch to the

01:05.290 --> 01:06.610
superuser account.

01:07.180 --> 01:09.940
See the tk engine x sites enabled.

01:09.940 --> 01:15.370
This command changes the current directory to the etsy engine x sites enabled directory.

01:15.700 --> 01:22.650
This directory contains the engine X configuration files for all the enabled sites on the system LSL

01:22.660 --> 01:23.240
tier.

01:23.260 --> 01:29.140
This command lists the contents of the current directory in a long format sorted by modification time

01:29.140 --> 01:30.250
in reverse order.

01:30.580 --> 01:37.000
The option shows the information in a long format, including permissions owner size and timestamp.

01:37.360 --> 01:43.060
The DT option sorts the files by modification time and the r option reverses the sort order.

01:43.540 --> 01:46.270
Now let's remove default configuration.

01:46.810 --> 01:52.420
The unlink command followed by the file path etsi engine X sites enable default is used to remove a

01:52.420 --> 01:55.300
symbolic link in the UNIX like operating system.

01:55.630 --> 02:01.360
The symbolic link points to the file in the site's available directory and enables engine X to use it

02:01.360 --> 02:03.070
as a server configuration.

02:03.370 --> 02:09.040
When this link is removed, the default engine x server configuration is disabled and will no longer

02:09.040 --> 02:12.250
be used by engine X when serving incoming requests.

02:12.820 --> 02:15.490
Now we'll create new configuration file.

02:16.000 --> 02:22.540
The TC engine X connected by box start local conf and add the following code.

02:23.050 --> 02:25.930
It's an engine X server block configuration.

02:26.290 --> 02:31.930
A server block is a named virtual server that can be used to host multiple websites on the same physical

02:31.930 --> 02:32.560
server.

02:33.130 --> 02:39.490
The server block listens to incoming requests on Port 80 and is identified by the server name by START

02:39.490 --> 02:40.150
local.

02:40.480 --> 02:46.930
The lesson directive specifies the IP address and port that the engine X server should listen on the

02:46.930 --> 02:47.260
server.

02:47.260 --> 02:53.080
Underscore name directive specifies the host name or domain name that the server block serves.

02:53.380 --> 02:57.850
The server block only processes requests that match the given server name.

02:58.360 --> 03:03.820
The server block is just a placeholder for the server content which needs to be added to this block

03:03.820 --> 03:05.170
for it to be functional.

03:05.710 --> 03:08.740
I am exiting then with column WQ command.

03:09.250 --> 03:11.140
No, I'll run engine x RT.

03:11.710 --> 03:18.130
The engine x TX command is used in Engine X web Server administration to test the configuration files

03:18.130 --> 03:19.450
for syntax errors.

03:19.810 --> 03:25.030
This command checks the configuration files for proper syntax and make sure that there are no errors

03:25.030 --> 03:26.890
in the engine x configuration.

03:27.190 --> 03:32.920
This is useful because if there are any errors in the configuration engine, X will fail to start and

03:32.920 --> 03:37.700
serve websites by using Engine X before restarting engine X.

03:37.720 --> 03:43.000
Administrators can identify and fix any errors in the configuration before they cause issues with the

03:43.000 --> 03:43.900
web server.

03:44.290 --> 03:51.070
The output of the command will either be configuration file etsi engine x engine x dot com test is successful

03:51.070 --> 03:54.130
or it will display the errors in the configuration file.

03:54.670 --> 04:03.010
Now we run system CTL reload engine X The system CTL Reload engine X command is used to reload the engine

04:03.010 --> 04:05.020
X service on a Linux system.

04:05.320 --> 04:11.770
The system CTL Command is used to manage system services and the reload sub command is used to reload

04:11.770 --> 04:14.350
the Engine X service without restarting it.

04:14.890 --> 04:21.010
This command is commonly used after making changes to the engine X configuration files, such as adding

04:21.010 --> 04:27.310
or modifying server blocks in order to have the changes take effect without disrupting existing connections.

04:27.880 --> 04:30.460
Let's check system status Engine X.

04:31.030 --> 04:37.090
The Command System CTL Status Engine X is used to check the status of the Engine X service on a Linux

04:37.090 --> 04:40.090
system that uses system B as it's in its system.

04:40.390 --> 04:46.210
System DX is a modern in its system and system manager used in many Linux distributions that replace

04:46.210 --> 04:47.380
the traditional system.

04:47.380 --> 04:52.270
V In its system, the system's CTL command is used to control the system.

04:52.270 --> 04:54.280
B System and service manager.

04:54.610 --> 05:00.130
The status sub command shows the current status of the Engine X service, including information about

05:00.130 --> 05:02.170
whether the service is running or inactive.

05:02.510 --> 05:07.400
Its process ID, ID and the state of any recent operations.

05:08.000 --> 05:14.030
In summary system CTL Status Engine X is used to check the current status and information about the

05:14.030 --> 05:16.340
Engine X service on the Linux system.

05:16.850 --> 05:22.010
Let's create a new directory with MK under the command.

05:22.010 --> 05:24.920
MK driver w w w bi box.

05:25.130 --> 05:27.920
Local creates a new directory with the name byte box.

05:27.920 --> 05:30.950
Start local in the var w w w directory.

05:31.250 --> 05:37.850
The directory var w w w is typically used as the root directory for web servers to serve content from.

05:38.150 --> 05:39.740
By creating a new directory.

05:39.740 --> 05:45.530
In this location you are setting up a location for the website with the domain name byte box local to

05:45.530 --> 05:47.030
store its web content.

05:47.570 --> 05:53.590
Let's add a new site and some info on it with Echo command The command echo site coming soon.

05:53.600 --> 06:02.720
Var w w w by xbox Local indexed HTML is used to create an index html file in the var w w w byte box

06:02.930 --> 06:04.070
local directory.

06:04.370 --> 06:07.640
The contents of the file will be the string site coming soon.

06:08.240 --> 06:12.470
The echo command is used to display text on the screen or write it to a file.

06:12.470 --> 06:17.990
In this case, the text is redirected to the index HTML file using the operator.

06:18.380 --> 06:22.010
If the file already exists, its contents will be overwritten.

06:22.010 --> 06:26.840
If it does not exist, a new file will be created with the specified contents.

06:27.380 --> 06:30.770
And finally, we check if it's functioning well here.

06:30.770 --> 06:31.610
The command curl.

06:31.610 --> 06:36.500
192.168.1.2 is sending a request to the IP address.

06:36.500 --> 06:42.380
192.168.1.2, which is the address of my demo server.

06:42.710 --> 06:45.710
The response from the server is displayed on the console.

06:45.980 --> 06:51.560
This command is typically used to check if a web server is running and accessible from a client machine.

06:51.890 --> 06:58.550
It can also be used to retrieve data from a remote server like web pages, images and so on, and to

06:58.550 --> 07:02.750
test the functionality of a web server or an API endpoint.

07:02.750 --> 07:05.630
We can also open up a web browser and check it.

07:05.930 --> 07:09.860
So as you can see, the newly created site is up and running.

07:10.370 --> 07:11.930
Now for you to know.

07:12.170 --> 07:18.710
You can also add the following content to the ETSI engine Zukunft Divide box dot local dot com file

07:18.710 --> 07:22.340
without using a text editor by using the following command.

07:23.200 --> 07:24.190
Echo server.

07:24.670 --> 07:25.240
Listen.

07:25.240 --> 07:25.780
80.

07:26.480 --> 07:27.020
Server.

07:27.020 --> 07:27.740
Underscore name.

07:27.740 --> 07:28.010
Byte.

07:28.010 --> 07:28.370
Box.

07:28.580 --> 07:29.270
Local.

07:30.070 --> 07:32.740
Hashtag placeholder for the server content.

07:33.250 --> 07:37.990
Pseudo TC engine x confirmed by box start local conf.

07:38.500 --> 07:46.150
This command will use echo to output the content and pipe it to pseudo tc engine x conf buybacks local

07:46.150 --> 07:53.320
conf which will write the content to the specified file with superuser privileges as a wrap up here

07:53.860 --> 08:03.220
substitute user for root user pseudo su remove default configuration unlink etsi engine x sites sensible

08:03.220 --> 08:12.970
default create new configuration file the then tc engine x conf by box start local conf at the following

08:12.970 --> 08:19.120
content to the named site local dotcom file server listen 80.

08:19.840 --> 08:20.380
Server.

08:20.380 --> 08:21.100
Underscore name.

08:21.100 --> 08:21.370
Byte.

08:21.370 --> 08:21.730
Box.

08:21.910 --> 08:22.630
Local.

08:23.410 --> 08:34.060
Test engine X Configuration Engine x TX Reload Engine X Service System CTL Reload Engine X Check Engine

08:34.060 --> 08:44.890
X Service Status System CTL Status Engine X Create directory for website content or driver w w w bi

08:44.890 --> 08:46.120
box local.

08:46.770 --> 08:53.550
Create a placeholder index html file for the website eco site coming soon.

08:53.760 --> 08:58.140
Var w w w by box local indexed html.

08:58.740 --> 09:00.630
Test the connection to IP address.

09:00.630 --> 09:03.720
192.168.1.2.

09:04.320 --> 09:07.650
Curl 192.168.1.2.
