CentOS Linux Server Guide

CentOS Web Server

 

Starting the Apache Web Server

 

Different Apache web server  installation method (via rpm or via source), has different starting  apache method.

 

For RPM installation

 service httpd start

 

For source code installation

/usr/local/apache2/bin/apachectl start

 

You might need to enable the apache services when the CentOS start, to check the apache status each level. The example below shows that our httpd (apache) service is not started, when the CentOS boot.

chkconfig --list httpd
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
 

 

To enable apache start at level 3, 4 and 5. Let us run the the following command

chkconfig httpd --level 345 on

 

Let us check our setting again, the apache web server is now running at level 3, 4 and 5

chkconfig --list httpd
httpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off

 

Back to CentOS Apache Web Server



Copyright 2011 http://www.1a-centosserver.com All Rights Reserved

All trademarks are the property of their respective owners.

Contact Us | Terms of Use | Privacy Policy