Web Hosting How-Tos

  Home arrow Web Hosting How-Tos arrow Page 3 - Configuring Apache 2.0 -- Beginning
Web Hosting Articles  
Web Hosting FAQs  
Web Hosting How-Tos  
Web Hosting News  
Web Hosting Reviews  
Web Hosting Security  
Weekly Newsletter 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Contact Us 
Site Map 
Privacy Policy 
  >>> SIGN UP!  
  Lost Password? 

Configuring Apache 2.0 -- Beginning
By: Michael Swanson
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15

    Table of Contents:
  • Configuring Apache 2.0 -- Beginning
  • Configuration File
  • Basic Configuration Options
  • Directory Setup
  • Index Options

  • Rate this Article: Poor Best 
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article




    Configuring Apache 2.0 -- Beginning - Basic Configuration Options

    (Page 3 of 5 )

    There are several directives which are important to configure for your server.

    1. Listen: The listen directive tells the server what IP address and/or port the Apache process is supposed to listen to, e.g. “Listen” would tell the server to listen on the loopback interface at port 80. You can configure multiple listen directives to bind the server to multiple IP addresses and ports.

    2. DocumentRoot: This directive tells Apache what the root directory for served documents will be. If your server is set to listen on, the directory specified in DocumentRoot is the directory that will be served when a Web browser connects to simply Any sub-directories of the one specified here are automatically served out publicly. This directive might look something like “DocumentRoot /www/PubDocs.”

    3. ServerRoot: This directive tells Apache where to look for the basic file structure of the server itself. Generally, this should be left alone, as normally you will want this to point to the directory where you installed Apache.

    4. Timeout: The timeout directive determines how long the server will wait before terminating a connection that has stopped responding.

    5. ServerAdmin: This directive provides the email address for the server administrator. This is relatively important, as it is often used in error pages to allow users to contact the admin and let him or her know about a problem.

    6. ScriptAlias: This directive tells Apache where to look when someone requests a file in the /cgi-bin/ directory. An example of this directive looks like: “ScriptAlias /cgi-bin/ /www/apache/cgi-bin/.”  These files are allowed to be executed by default, so you should be extra careful what files are placed in this directory.

    7. HostnameLookups: This directive can be set to “On” or “Off.” It tells Apache whether or not to go look up the hostnames of IP addresses it gets requests from, and place the hostname in the log file rather than the IP address. It can make your log files a bit more readable, but adds substantially to the bandwidth used by the server since it must do a host lookup for each entry it adds to the log files.

    8. ErrorLog: This simply tells Apache where to put the error log file.

    9. LogLevel: This determines what types of things get recorded in the error log file.  This can be set to “EMERG”; “ALERT”; “CRIT”; “ERR”; WARNING”; “NOTICE”; “INFO”; “DEBUG”; and each of these gives respectively more info than those before it. It’s generally not a good idea to set a production server to higher than the “WARNING” level, since it has an impact on performace.

    10. LogFormat: This option determines the exact information placed on each logfile line when something is logged. This is important for setting up log files to be processed by other utilities, and simply for your own understanding. The syntax for this configuration line can be found here: http://httpd.apache.org/docs-2.0/mod/mod_log_config.html.

    More Web Hosting How-Tos Articles
    More By Michael Swanson


    - Phishing Scams: An Overview and How to Detec...
    - Tips for Safe Downloading Online
    - How To Avoid Spam
    - How to Get Into Ethical Hacking
    - How to Prevent Drive-by Downloads
    - Facebook Timeline Tips and Tricks
    - How to Keep Up with Facebook`s Changes
    - Wi-Fi Network Security Tips
    - Tips for Safe Online Holiday Shopping
    - Facebook Privacy: Keeping Up with the Const...
    - Tips for Facebook Privacy
    - How to Cover Your Tracks on the Web
    - SSH Keys for FileZilla and Putty in Cpanel
    - How to Create a Filezilla FTP User
    - How to Install FileZilla Server

    Developer Shed Affiliates


    © 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap