Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 2003

Apache 2.0 on Win2K

The popular open-source Web server extends its Windows capabilities
RSS
Subscribe to Windows IT Pro | See More Internet Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Using Apache to Create Virtual Hosts

Download the Code Here

 See corrections to this article

Note the absence of an Active Server Pages (ASP) module in Table 1. I intentionally left ASP out of the list because at the time of this writing, Apache doesn't offer full support for ASP. Fortunately, a project is in the works within the Apache community to create and maintain an ASP module that can compete with Sun ONE Active Server Pages (formerly Sun Chili!Soft ASP) for UNIX. Although this new ASP module, which is implemented through the Apache mod_perl module, doesn't offer the same breadth of features as IIS, the module is maturing slowly. For more information about the ASP module's development, you can visit http://www
.apache-asp.org.

As you can see, Apache 2.0 offers Windows users enough performance, flexibility, and power to rival IIS. The next step is to install Apache on a test system and see for yourself.

Installation
The first step in installing Apache is to download the most recent product software from http://www.apache.org/dist/httpd/binaries/win32. Notice that the Windows package doesn't include SSL support. If you want SSL support, and many sites do, you need to download OpenSSL (an open-source SSL library implementation) from http://www.openssl.org, then use Microsoft Visual C++ (VC++) to compile OpenSSL and mod_ssl. More information about this process is available at http://httpd.apache.org/docs-2.0/mod/mod_ssl.html.

To install the Apache software, first remove or disable any existing IIS installation, then click the downloaded Microsoft Installer package for Apache, agree to the Apache license, and enter your Web site's domain name, your Web server's name, and the Webmaster's email address. The Installer will provide some default suggestions, which you can change if necessary.

Next, you receive a prompt to choose the Typical or Custom installation. Little difference exists between these installations. The Custom installation lets you selectively install the required programming headers and libraries to compile new modules, so if you plan to compile modules later, you need to install these libraries. Otherwise, choose Typical.

Apache lets you use the default installation path for the Apache programs, or you can choose an alternate path. Note that you can later change the DocumentRoot path (known as the WebRoot path in IIS) in the Apache configuration file.

When you click Finish to complete the installation, the Installer creates the Apache2 service, starts the Apache server, and adds the Apache Control icon, which lets you stop and start Apache, to the System Tray. To test whether Apache is running on the Web server, view the URL http://localhost.

Configuration
To configure Apache, modify the plaintext file httpd.conf in the \program files\apache group\apache2\conf directory. Although this file looks rather complicated, you don't need to concern yourself with most of the included directives (i.e., configuration commands). The file is ready to be used; at most, you might need to tweak a few settings for your environment.

The file's syntax is simple: The syntax permits only one directive per line, and directives aren't case sensitive, although some directives' options are. To comment out directives, add the pound sign (#), which is the comment character in most UNIX configuration and script files, to the beginning of each line.

So what directives should you pay close attention to as a new Apache user? The most important directives are ServerName, DocumentRoot, LoadModule, and—especially important for Windows users—ThreadsPerChild and MaxRequestsPerChild. (For a complete listing of directives, visit http://httpd.apache.org/docs-2.0/mod/directives.html.)

ServerName. The ServerName directive specifies the Web server's DNS name. For example, if you've configured DNS so that your Apache Web server is named www.example.com, configure the ServerName directive as follows:

ServerName www.example.com

DocumentRoot. The DocumentRoot directive specifies the root of the document tree visible to clients—WebRoot in IIS. Thus, if you use the D drive to store your Web site, configure the DocumentRoot directive as follows:

DocumentRoot D:/WebRoot

The path statement in this directive might appear a bit odd. Apache supports Windows drive letters but requires the use of UNIX-style forward slashes to separate file-path components. Thus, the Windows-style path D:\WebRoot becomes D:/WebRoot. Also, be aware that the Apache2 service runs as SYSTEM, so the location you specify in the DocumentRoot directive needs Read access for the SYSTEM account. (Running as SYSTEM is the default, but you can alter that by changing the Apache service's Log On property.)

   Previous  1  [2]  3  Next 


Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Corrections to this Article:

  • In Dustin Puryear's article "Apache 2.0 on Win2K" (April 2003, http://winnetmag.com, InstantDoc ID 38288), the author says that when installing Apache software you need to "first remove or disable any existing IIS installation." Is this a necessary step, and can Apache and Microsoft IIS coexist?
Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

How can I stop and start services from the command line?

...

New Microsoft/Yahoo! Deal? No

On Sunday, the Times of London reported that Microsoft had renewed talks with failing Internet giant Yahoo! and would manage its search engine for 10 years, while Yahoo! would retain control of its email, messaging, and content services. This report ...


Related Events Delivering Reliable and Effective Web-Based Applications

Making Web Application Perform Better: What to Watch, How to Watch It, and How to Fix It

Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing