15.2 Installing the Apache HTTP Server

To install the Apache HTTP server:

  1. Enter the following command:

    # yum install httpd
  2. Start the server, and configure it to start after system reboots:

    # service httpd start
    # chkconfig httpd on
  3. Check for configuration errors:

    # service httpd configtest
  4. Create firewall rules to allow access to the ports on which the HTTP server listens, for example:

    # iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
    # service iptables save