Monday, August 31, 2015

Install and configure httpd

We can install httpd webserver in centos using yum

 [root@easylinux ~]# yum -y install httpd

We need to  remove the welcome page

[root@easylinux ~]# rm -f /etc/httpd/conf.d/welcome.conf

We need to remove the default error page too

[root@easylinux ~]# rm -f /var/www/error/noindex.html

Now we need to Configure httpd. Replace the Server name to your own one.
[root@easylinux ~]# vi /etc/httpd/conf/httpd.conf

ServerAdmin admin@easylinuxalways.co.in

ServerName www.easylinuxalways.com:80

[root@easylinux ~]# /etc/rc.d/init.d/httpd start

Starting httpd:
[ OK ]

[root@easylinux ~]# chkconfig httpd on

[3]     Create a HTML test page and access to it with a web browser on Client to make sure it works normally.
[root@easylinux ~]# vi /var/www/html/index.html

<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Easylinuxalways.blogspot.in
</div>
</body>
</html>

No comments:

Post a Comment