How to configure Web Server on Red Hat Enterprise Linux 7?

Port : 80 (default)

Daemon : httpd

configuration file :  etc/httpd/conf/httpd.conf

Web page location : /var/www/html/

Check httpd :

[root@server8~]  rpm -qa|grep httpd

if not install package just install httpd package

[root@server8~] yum install httpd -y   // installed your package

[root@server8~] systemctl  restart httpd       //restart your package

[root@server8~] systemctl  enable httpd    // enable your package

[root@server8~] firewall-cmd      –permanent   –add-service=http  // configure firewall to allow access for http

[root@server8~] firewall-cmd  –reload   // reload service

create a default content page

[root@server8~] vim /var/www/html/index.html              //created a index html file

<h1>This is web server</h1>

now check your IP then brows your IP. it will show “This is web server”