Web Hosting How-Tos
  Home arrow Web Hosting How-Tos arrow Page 2 - Apache Configuration -- Advanced
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

Apache Configuration -- Advanced
By: Michael Swanson
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 10
    2005-02-02

    Table of Contents:
  • Apache Configuration -- Advanced
  • Other Protocols on Apache
  • SSL on Apache
  • Certificates

  • 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


    Apache Configuration -- Advanced - Other Protocols on Apache


    (Page 2 of 4 )

     

    Because of Apache’s modular nature, it is possible to serve multiple protocols from one software process. This means that you could conceivably use the Apache core to serve HTTP, POP3, SMTP, and more simultaneously. One thing to keep in mind when attempting this is that normally, you cannot serve more than one protocol on a single IP and port combination. This means that if you wish to use Apache to serve both HTTP and POP3 requests, you’ll need to use both ports 80 and 110 (the default HTTP and POP3 ports). This is important to think about, because you will need to configure both hardware and software firewalls accordingly. Usually, you won’t have to worry about conflicting ports; however, most well known protocols have a default or well known port that is defined so as to not conflict with any other protocols.

     

    Using the example of the POP3 module that is developed by the Apache Software foundation, we would need to make the following configuration changes to your Apache server. First, you will need to follow create a subdirectory “httpd-pop3” under the “modules” directory in the Apache home directory. You will then need to re-run the “configure” command with the option “--enable-pop”.  This will install the POP3 module into Apache.

     

    After you’ve installed the module, you need to correctly configure it in the httpd.conf file. This requires you to create a virtual host similar to the ones described in the previous article.  The following configuration block gives an example of this:

     

                <VirtualHost 123.234.345.111:110>

                            Pop3Protocol On

                            Pop3Maildrops /www/mail/pop3

                </VirtualHost>

     

    This configuration creates a virtual host listening to a specific IP on port 110, the Internet-standard port for POP3. The internal lines tell Apache to turn on the POP3 protocol on this virtual host, as well as define the directory where the server should look for the mail files.  However, this configuration alone does not suffice, as POP3 requires an authenticated user to make sense, since you need to make sure users only have access to their own email and that hackers don’t have access to any of it. To configure this, you need to use the following “Directory” block configuration:

     

                <Directory /www/mail/pop3>

                            AuthUserFile /www/auth/pop3.users

                            AuthName Pop3Auth

                            AuthType Basic

                            Require valid-user

                </Directory>

     

    Notice that this configuration sets up security for the same directory as is defined in the “Pop3Maildrops” line in the “VirtualHost” block above.  Otherwise, this acts as any other authentication definition as described in the previous article; it defines where the user file is to be found, the name transmitted to the client for authentication against, what type of authentication to use, and finally requires that a user be validated before they are granted access to the contents of the directory.

     

    Basically, setting up and configuring this protocol takes advantage of some of the techniques described in the “Intermediate” article and describes how they work together with a Protocol Module to allow even more flexibility to the Apache server.

     

    More Web Hosting How-Tos Articles
    More By Michael Swanson


       · If anyone wishes to discuss this series of articles, please feel free to post here...
     

    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 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek