3. Installing a Web Server Using Apache HTTPd

Apache HTTPd can be configured graphically or via the command line:

3.1. Graphically

Within Gnome or KDE, do the following:

  • Install the httpd package. Click Main Menu => System Settings => Add / Remove Applications. Select Web Server. Also visit the Server Configuration Tools menu and select redhat-config-httpd. When finished, hit Update.

  • Configure Apache HTTPd. Click Main Menu => System Settings => Server Settings => HTTPd. Note the current value of DocumentRoot. Modify the ServerAdmin option to point to your own email address.

  • Add your custom HTML files into the the /var/www/html/ directory. Make sure file permissions allow read access from the other permission class.

  • Start the httpd service and set it to start by default. Main Menu => System Settings => Services, select the httpd service and slick Start to start the service (use Restart if it is already running).

  • Confirm your web server is working by visiting http://localhost in y our web browser. You should see the Fedora Core test page.

3.2. On the command line

Open a terminal and do the following:

  • Install the httpd package. At the prompt, then switch to the root user:

    su -l root

  • Install the package:

    rpm -Uvh /path/to/files/httpd-*.rpm

  • Open /etc/httpd/conf/httpd.conf in an editor (for example, nano:

    nano /etc/httpd/conf/httpd.conf

    Notice the current value of DocumentRoot. Modify the ServerAdmin option to point to your own email address.

  • Start the httpd service and set it to start by default with the Services tool or by typing:

    
    service httpd start
    chkconfig httpd on
    
    

  • Confirm your web server is working by visiting http://localhost in your web browser. You should see the Fedora Core test page.

If you have problems:

apachectl configtest