Web Hosting How-Tos
  Home arrow Web Hosting How-Tos arrow Page 2 - Configuring Apache – Intermediate
Web Hosting Articles  
Web Hosting FAQs  
Web Hosting How-Tos  
Web Hosting News  
Web Hosting Security  
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
ASP Web Hosting  
ASP.NET Web Hosting 
Budget Hosting 
Coldfusion 
Colocation 
Mobile Linux 
APP Generation ROI 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Reseller Web Hosting 
Shared Hosting 
Small Business Hosting 
Virtual Private Servers 
Windows Web Hosting
 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB HOSTING HOW-TOS

Configuring Apache – Intermediate
By: Michael Swanson
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 14
    2005-01-12

    Table of Contents:
  • Configuring Apache – Intermediate
  • Modules
  • Authentication
  • Authorization

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      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
     
     
    ADVERTISEMENT


    Configuring Apache – Intermediate - Modules


    (Page 2 of 4 )

    One of the most useful features of Apache is its modular nature. Apache was and is developed with the intention of having other code blocks plugged into it to add new capabilities to the server. Some well-known examples of this modular nature are the PHP and Perl pre-processors. Each of those server-side languages require that the Web server knows how to handle certain files before they get sent out to a client. Apache allows the administrator to configure “handlers” for certain types of files that map a certain file extension to a specific module to have it run through that module’s code before it gets returned to the client. Modules can also do many more things than just filter text, but each module needs to be addressed on it’s own.

    Probably the most popular module to add to Apache is PHP, since PHP is one of the most popular and best known Web programming languages.  Adding it to Apache 2.0 is really relatively easy. To do this, you must begin by downloading and installing the PHP files. Once you have done this, adding support to Apache for PHP is simple. All you need to do is add a few lines to the httpd.conf file. These lines are as follows.  First, you must tell Apache to load the PHP module:

     LoadModule php4_module libexec/libphp4.so

    The above line tells the Apache server to load the module “libexec/libphp4.so” as the module named “php4_module.” Next, we must associate a certain file extension with the PHP interpreter, so that PHP files get parsed and processed correctly. We do this with the following AddType line:

     AddType application/x-httpd-php .php

    This line associates the “.php” file extension with the PHP interpreter, which tells the server to parse files ending in “.php” through the PHP interpreter.

    All of the above configuration is simple, really, on the Apache side for setting up PHP. Remember, however, that you must separately configure the PHP engine itself in a different file, called “php.ini.”

    More Web Hosting How-Tos Articles
    More By Michael Swanson


     

    WEB HOSTING HOW-TOS ARTICLES

    - Choosing a Web Host for Your WordPress Blog
    - Connecting to a Server using SSH: the Fundam...
    - How to Expand a Simple Website
    - Practical Virtualization with VirtualBox
    - Other Uses for Your Web Hosting Server
    - Hosting Your Own Website: Reliability
    - Introduction to Hosting Websites
    - Choosing a Website Host
    - How to Choose a Budget Web Host
    - URL Redirection
    - How to Link a Domain Name to a Dynamic IP
    - How to Set up a Simple Website
    - Choosing the Right Kind of Web Hosting
    - Introduction to Choosing the Right Web Host
    - Strategies for Creating Domain Names






    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek