1.3. Quick and Dirty Web Server

The majority of this course concerns the (re)configuration of the web server. However, we should briefly describe what a system administrator should do if he or she is happy with the default (which is not a bad set of defaults, by the way).

If the system administrator is happy to do all the changes to the web site as root then nothing more needs to be done other than turning on the web server.

To enable the web server (so that it gets started at system boot) the system administrator needs to use the chkconfig command.

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

The next time the system is rebooted, the web server will be started. If you don't want to wait until a reboot, or don't want to reboot, then it can be manually started by running the script that would be run at boot time.

# /etc/init.d/apache2 start
Starting httpd2 (prefork)                                          done

If you take this easy approach then you need to know the following few facts.

You can make life much simpler for yourself (as the system administrator) if you create a group of users who are allowed to edit the document tree /srv/www/htdocs/. We cover the steps needed to achieve this later in the course.