Now In This Article We will Learn How to Create Our Own Web-Server Page By Writing Some Information In HTML Format In a Very Simple way.
First We will Create a One Ec-2 Instance or a Virtual Machine, inside that we Get a 2 IP's such as Public IP & Private IP
Public IP is For My Client or User .
Private IP is For My Internal Communication .
- Now Click that Check Box And connect it
- Then go inside a SSH client and Copy that Example ssh -i "New-key-pair.pem" ec2-user@ec2-15-206-81-18.ap-south-1.compute.amazonaws.com
- After that, Open Xshell Software Which is Mostly Used in Company and This Software is used to Connect My Public IP By Doing SSH (simple Secure Shell) then Paste in that Linux Terminal and Enter .
- Then They Ask a Key For Access, Then click on Accept and Save Then Click On Browse And Open file , after that You have to Provide Your Private Key select it and Open it, Then Ok
- After Doing This Things Now Your Linux Remote machine will connected Succesfully .
- Now First You have to run one Cmd Sudo su - To become a root user .
- Then You will have to install httpd Packages first and the cmd is ( yum install httpd -y ) .
- Now You Successfully Installed httpd package .
- After Succefully installing httpd packages You need to start service .
- After Starting The Service you have to open path of Apache Server where the file is and the cmd is cd /var/www/html
- Now Copy the Public Ip and Paste Into The Browser, and You get Default Apache server .
- Now come to Linux terminal and run one cmd vi index.html
Now You get Like Notepad in a vi editor page and enter some information such as given below,
<html>
<body bgcolor=pink>
<h1> This is My Custom Web Server </h1>
</body>
</html>
and come out of The Page and cmd is :wq!
enter
- In The last Refresh That Browsing Page and You get Your Custom Web page Through the same IP.
Congratulations You Create Your custom Web-Server !
Thank You for Reading this Blog . Like, share, And comment !
Top comments (0)