Now let's see how to create a server configuration for a demo website using Engine X.
The development Virtual machine is already up and running and I've already elevated privileges by using
sudo su dash.
First we'll remove the default engine x site configuration in the ETSI engine x site's enabled directory.
Then we'll create a new configuration file in the ETSI engine Zukunft directory named by box dot local
dot com for the demo site by box start local.
We'll use them to edit the file.
It's important to name the file after the site and use the dot conf extension so that engine X recognizes
it when reloading the configuration.
We'll also need no more of the V host.
It can be removed or renamed without the dot conf extension.
Let's type the following commands.
Sudo sue dash.
This command switches the current user to the superuser root account.
Sudo is used to run the subsequent command with superuser privileges and su is used to switch to the
superuser account.
See the tk engine x sites enabled.
This command changes the current directory to the etsy engine x sites enabled directory.
This directory contains the engine X configuration files for all the enabled sites on the system LSL
tier.
This command lists the contents of the current directory in a long format sorted by modification time
in reverse order.
The option shows the information in a long format, including permissions owner size and timestamp.
The DT option sorts the files by modification time and the r option reverses the sort order.
Now let's remove default configuration.
The unlink command followed by the file path etsi engine X sites enable default is used to remove a
symbolic link in the UNIX like operating system.
The symbolic link points to the file in the site's available directory and enables engine X to use it
as a server configuration.
When this link is removed, the default engine x server configuration is disabled and will no longer
be used by engine X when serving incoming requests.
Now we'll create new configuration file.
The TC engine X connected by box start local conf and add the following code.
It's an engine X server block configuration.
A server block is a named virtual server that can be used to host multiple websites on the same physical
server.
The server block listens to incoming requests on Port 80 and is identified by the server name by START
local.
The lesson directive specifies the IP address and port that the engine X server should listen on the
server.
Underscore name directive specifies the host name or domain name that the server block serves.
The server block only processes requests that match the given server name.
The server block is just a placeholder for the server content which needs to be added to this block
for it to be functional.
I am exiting then with column WQ command.
No, I'll run engine x RT.
The engine x TX command is used in Engine X web Server administration to test the configuration files
for syntax errors.
This command checks the configuration files for proper syntax and make sure that there are no errors
in the engine x configuration.
This is useful because if there are any errors in the configuration engine, X will fail to start and
serve websites by using Engine X before restarting engine X.
Administrators can identify and fix any errors in the configuration before they cause issues with the
web server.
The output of the command will either be configuration file etsi engine x engine x dot com test is successful
or it will display the errors in the configuration file.
Now we run system CTL reload engine X The system CTL Reload engine X command is used to reload the engine
X service on a Linux system.
The system CTL Command is used to manage system services and the reload sub command is used to reload
the Engine X service without restarting it.
This command is commonly used after making changes to the engine X configuration files, such as adding
or modifying server blocks in order to have the changes take effect without disrupting existing connections.
Let's check system status Engine X.
The Command System CTL Status Engine X is used to check the status of the Engine X service on a Linux
system that uses system B as it's in its system.
System DX is a modern in its system and system manager used in many Linux distributions that replace
the traditional system.
V In its system, the system's CTL command is used to control the system.
B System and service manager.
The status sub command shows the current status of the Engine X service, including information about
whether the service is running or inactive.
Its process ID, ID and the state of any recent operations.
In summary system CTL Status Engine X is used to check the current status and information about the
Engine X service on the Linux system.
Let's create a new directory with MK under the command.
MK driver w w w bi box.
Local creates a new directory with the name byte box.
Start local in the var w w w directory.
The directory var w w w is typically used as the root directory for web servers to serve content from.
By creating a new directory.
In this location you are setting up a location for the website with the domain name byte box local to
store its web content.
Let's add a new site and some info on it with Echo command The command echo site coming soon.
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
local directory.
The contents of the file will be the string site coming soon.
The echo command is used to display text on the screen or write it to a file.
In this case, the text is redirected to the index HTML file using the operator.
If the file already exists, its contents will be overwritten.
If it does not exist, a new file will be created with the specified contents.
And finally, we check if it's functioning well here.
The command curl.
192.168.1.2 is sending a request to the IP address.
192.168.1.2, which is the address of my demo server.
The response from the server is displayed on the console.
This command is typically used to check if a web server is running and accessible from a client machine.
It can also be used to retrieve data from a remote server like web pages, images and so on, and to
test the functionality of a web server or an API endpoint.
We can also open up a web browser and check it.
So as you can see, the newly created site is up and running.
Now for you to know.
You can also add the following content to the ETSI engine Zukunft Divide box dot local dot com file
without using a text editor by using the following command.
Echo server.
Listen.
80.
Server.
Underscore name.
Byte.
Box.
Local.
Hashtag placeholder for the server content.
Pseudo TC engine x confirmed by box start local conf.
This command will use echo to output the content and pipe it to pseudo tc engine x conf buybacks local
conf which will write the content to the specified file with superuser privileges as a wrap up here
substitute user for root user pseudo su remove default configuration unlink etsi engine x sites sensible
default create new configuration file the then tc engine x conf by box start local conf at the following
content to the named site local dotcom file server listen 80.
Server.
Underscore name.
Byte.
Box.
Local.
Test engine X Configuration Engine x TX Reload Engine X Service System CTL Reload Engine X Check Engine
X Service Status System CTL Status Engine X Create directory for website content or driver w w w bi
box local.
Create a placeholder index html file for the website eco site coming soon.
Var w w w by box local indexed html.
Test the connection to IP address.
192.168.1.2.
Curl 192.168.1.2.