What server are HTP, this lesson is very fun lesson, because I promise you at the end of this lesson,
you're going to be so proud of yourself that you are going to create your own first Web site on your
own server.
So the purpose of the GDP service or the Web server is what is to serve the pages?
Right, like Google, Facebook, Hotmail or whatever the page that's out there on the Internet.
And even let's say if you wanted to sell something or you want to build your own website or even your
profile website.
And you want to build it, you actually go and pay to companies like GoDaddy or X.com, but now you
could actually have your own machine and you can build your own website and you can publish it online
so people could see it.
So you have to pay.
But anyway, this is this this lesson.
The purpose of this lesson is not to tell you how to build your Web pages and publish it and without
paying or anything.
But is this lesson is just to tell you how a Web server works and how we could build a Web page in a
Linux machine.
The service or package name that needs to be installed or running in our Linux environment is called
HTP.
The files are the configuration file of HPD is etsi htp cough slash htp dot com.
This is the configuration file where you make changes, allow connections, run a run on a specific
protocol, specify the user directories and a lot of bunch of information.
The next file we have is w w w slash e-mail indexed html.
This is your home page.
Whatever the changes you make in indexed HTML, this is what it's going to show up on your home page.
So the service to start a service or to restart a service, a system ctrl restart htp d and to enable
the service, which means if you want the service to restart or start when your computer starts, it's
systems that'll enable HTTP.
The log files is VWA slash log slash HTP.
So this is the log file, if you are troubleshooting any issues, you could go into this log file and
see why your server is not working anyway.
Without further ado, will log into the next machine and we will start or start building our first page
and I will go into my machine.
I got my IP address from my machine and I logged in already into a recession.
So I'm going to go into my study session.
It's become routine,
we are logged in as rude because I have the pound sign here, it's clear the screen.
Let's go back to our configuration, the first configuration file, before we get into a configuration,
we need to make sure we do have the package for HTP d HTP package.
Yes, we do see right here, this is the package HPD sent to us, this one is DPD Tools.
There are additional tools that are available for this package and this is additional package that you
could install, whether that gets installed automatically.
Those are part of the dependancy anyway.
The main package, we are concerned with this package.
If you don't see this package on your Linux machine, you will simply has to run, jump, install HTP
and it will go in and it will say, I found a package for you.
Do you want me to install it?
And you say yes.
And you installed, by the way, since I already have it, it says no package SCDP available or I should
have said D and then he would say that package this already installed and latest version.
But once the package is there, then let's go to our configuration file at C htp kaf
htp d.
Sorry, this is EPD.
Just make a correction.
I have D so KDDI cough and the configuration file is HTP Duncalf so I will view this file and see if
there are any changes that I have to make.
For example, let's do more for this file and anything that you see that starts with hash or pound,
it means it's just a comment.
So you could know that and you could say see right here, this is the root file system for this service
is NEHTA PD and it's going to listen on Port Eighty.
What it means every time you go to any Web site, all the websites run on Port 80 or Port 443, which
is a secure Web site, which often prompts you that this is a secure Web site.
Do you want to continue?
And then you will say yes.
So if you want to change this port to some other ports, then you have to specify in the browser you
URL and that's how you get in.
But anyway, this is a configuration file and another file that we have to find is right here says Document
Route.
This is the one that I have listed here.
It says war w w w e m l.
And then the last file, this is basically telling me that the main page or the home page of your Web
server will be located in this directory.
And there are many, many other parameters that you could change in this configuration file.
The next the home page file is the one that we have to go to now in order to start making our page.
So we'll go to war w w w html and the file name is indexed dot html as well as mysel tr and you will
see here I do have a file name indexed HTML.
If you don't see this file, don't panic.
Create this file from scratch and you know how to create a file from scratch.
You could do Tushka Man or you could do Vickerman.
When I first created this indexed e-mail file, of course there was no file existed in this direction,
so I created from scratch.
I have already some of the parameter sets and my home page set in this file.
So let's look at it.
So I want you to do V.I. indexed HTML.
And then hit enter, the first thing is in your page, you always have to type doc type space, HTML
and HTML code always starts and begins with less then and more than signs.
This is how it works.
Now you notice you are learning HTML code.
The next line you would have to specify that this is an HTML file.
So html open close.
The next line I have is body.
What's inside are what shows on my home page.
This is the body style background color like grey.
This is the light grey color I want for my page.
Then next one I have B.R..
B-R stands for break.
I want a space then I have H1 rescinds for it.
Header one I have in my header one style text aligned center.
I wanted to show up right in the middle and welcome to my first page and then you close the header,
then you have header for these are the different fonts actually had a one, would have a bigger font
header to lesser, had a three smaller and smaller and so on.
And then on the second line I have my name is Emran Absol and break break break.
Close the body which you started right here.
If you notice side started the body right here.
Now you closing it and you're closing the HTML right here.
When you started it, every time you close these tags, always put the slash.
Now how do we know what type of HTML code we have to add more that you have to go into HTML class if
you really want to learn how to build your websites.
But this is just a basic lesson.
I want you to know if you want to get into it or that will definitely help you to get a job.
So I have all that and I want you to type everything that you see here in your indexed HTML page.
I have also copied this entire content to the description of this lesson so you could copy from there
and type it from there.
Once you have it typed, then you could simply say and quit.
Now, the fun part, how do we access that page to access this page, you have to open up a browser
to view that page, right?
OK, so how do we open the browser?
You need to know the address like, you know, Google dot com, Mohammed dot com.
What is the address of this?
Well, we haven't put in this address in a DNS.
So then how do we access we would access it through the IP address and the IP address is one way to
168, one to 12.
So let's take this IP address and put it in a browser.
So I have a browser here.
I will put it this right here, as you could see right now.
Make sure you are putting this IP address on the same machine where you're running your Linux machine.
So right now is trying to connect and it is not connecting.
I think I know why, because every Linux machine by default runs firewall and you have to have a firewall
rules in place to allow Port 80 traffic or simply disabling I most of the time disable it.
But again, depending on your company regulations and security policies, you should comply with that.
But for this training, I would say go ahead and disable this firewall.
So I will do system CTL Stop Firewall D This is the name of the firewall service you hit enter and it
has stopped the firewall.
By the way, I should have said, let's do the start.
It will start, and before you stop it, just check the status, whether it's running or not.
And if you had run this command before stopping it, you would have seen that it is up and running.
So that is why we are not able to get into our home page.
So let's stop it now.
OK, it has stopped.
Let's go back to your browser and this time just hit Refresh or F.I..
Still not able to connect and see why he have stopped a firewall.
Two months if grandpaw.
Firewalled, it is not running, right, it's just grabbing for grab, then why it's not running.
Think about it.
I want you to think about it.
Think like a system administrator.
Why it's not running.
You know why, let's go back to our lesson we have and start right here.
Look, it's a service.
We haven't started the service itself, the service that's going to serve the page, the service that's
going to take the request and write that service has to run to actually have the Web server running.
So let's go to ah to the PUDI section again and now start the service system before we start, of course,
let's check if it's running or not.
HTP
inactive makes a lot of sense, right?
Yes, it's dead.
That's why we couldn't get to our party server.
OK, started.
It is started now.
OK, cross your fingers, go to your web browser and do five again.
Ha.
We got our first page.
Welcome to my first page.
My name is Imran Afzal.
Do you guys remember this is the same message that I have in my e-mail text.
Right.
If you don't remember, let's go back and do it myself here on our directory and you will see do more
index and you'll see here.
Welcome to my first page.
And my name is Imran Eversole.
This is the only two lines I have.
They go right.
So if you wanted to modify it, let's say V.I. and I'll say, take out this text and just put.
I did it.
Yeah.
No CIA yet, but.
OK, anyway, so you got my point.
Let's save it.
OK, so now what you should see here, right?
The message that we change.
So let's do fight.
I did it.
Yeah.
So that's how you create your first page.