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
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

Google's Browser Created Out of Fear of Microsoft

A deep fear of Microsoft drove Google to create its own Web browser, the company's cofounders implicitly admitted Tuesday, though each was careful never to mention the software giant by name. Instead, during a press conference, Google's leaders discussed ...

Let's Get Out of the (Network) Neighborhood

Network Neighborhood might've made sense way back when, but it's long past obsolete today. ...


IIS and Web Administration Whitepapers The Five Secrets to Controlling Your SharePoint Environment

Extended Validation SSL Certificates

Related Events 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.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

IT Connections
Dive into the new Microsoft platforms and products you implement and support with the experts from Microsoft, TechNet Magazine, Windows ITPro and industry gurus. There are 70+ sessions and interactive panels with networking opportunities.

Attention User Group Leaders...
Announcing the eNews Generator—a FREE HTML e-newsletter builder for user group leaders. Build your HTML and text e-newsletters in minutes and add Windows IT Pro & SQL Server Mag articles alongside your own message!.

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Get SQL Server 2008 at WinConnections
Don’t miss Microsoft Exchange and Windows Connections conferences, the premier events for Microsoft IT Professionals in Las Vegas, November 10-13. Every attendee will receive a copy of SQL Server 2008 Standard Edition with one CAL.



Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
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 Technical Resources 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