How to Install and Configure Apache Web Server in Centos 7,8 / Redhat 7,8 / Fedora
How to Install and Configure Httpd Apache Web Server for Static WebHosting in Centos 7,8 / Redhat 7,8 / Fedora
Apache web Server is one of the most popular web server software. Apache Web Server works on Server – Client Architecture. It works on port number 80 and uses tcp protocol. Many Web Hosting providers use Apache web server to host our websites .In this blog we will learn that how can we setup Static Web Hosting Server in Centos / Redhat / Fedora.
Package Name – httpd
Document Root – /var/www/html
Main Configuration File – /etc/httpd/conf/httpd.conf
1) Install the Apache Server Package.
2) Upload you website content to /var/www/html.
/var/www/html is called the Document Root of Apache Web server. In this Directory we have to put or upload our website files (i.e) index.html , style.css files, etc.
I am creating a file in /var/www/html called index.html for the demonstration.
press i to get into insert mode
after making changes in the file press escape from keyboard and press :wq! to write and quite from file.
3) Start and Enable the httpd Service.
systemctl enable httpd
4) Apply the firewall rule.
firewall-cmd –reload
5) Open your Web Browser.
http://<your_ip>
Our Web Server is up and Running.
If you want to open it with a domain. like www.example.com then you need a DNS Server or you can just setup /etc/hosts file for local name resolution. but this you need to setup on all the client systems in which you want to open the website by your domain. or you must setup a DNS Server.
press i to get into insert mode
your_server_ip your_domain_name
192.168.122.1 www.letslearntech.com
after making changes in the file press escape from keyboard and press :wq! to write and quite from file.
If you are using a public ip then you need to buy a domain and point it to your public ip.
very nicely explained
Thanks
I don’t even know how I ended up here, but I thought this
post was great. I do not know who you are but certainly you’re going to a famous
blogger if you are not already 😉 Cheers!
Thanks 🙂
Thanks for another informative website.
The place else may just I get that kind of information written in such a perfect means?
I’ve a challenge that I am just now running on, and I’ve been at the glance
out for such info.
Thanks 🙂