| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
| <HTML> |
| <HEAD> |
| <TITLE>Compiling Apache for Microsoft Windows</TITLE> |
| </HEAD> |
| |
| <!-- Background white, links blue (unvisited), navy (visited), red (active) --> |
| <BODY |
| BGCOLOR="#FFFFFF" |
| TEXT="#000000" |
| LINK="#0000FF" |
| VLINK="#000080" |
| ALINK="#FF0000" |
| > |
| <!--#include virtual="header.html" --> |
| |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
| <HTML> |
| <HEAD> |
| <TITLE>Using Apache with Microsoft Windows</TITLE> |
| </HEAD> |
| |
| <!-- Background white, links blue (unvisited), navy (visited), red (active) --> |
| <BODY |
| BGCOLOR="#FFFFFF" |
| TEXT="#000000" |
| LINK="#0000FF" |
| VLINK="#000080" |
| ALINK="#FF0000" |
| > |
| <!--#include virtual="header.html" --> |
| |
| <H1 ALIGN="CENTER">Compiling Apache for Microsoft Windows</H1> |
| |
| <P>There are many important points before you begin compiling Apache. |
| See <A HREF="windows.html">Using Apache with Microsoft Windows</A> |
| before you begin.</P> |
| |
| <P>Compiling Apache requires Microsoft Visual C++ 5.0 (or later) to be |
| properly installed. It is easiest to compile with the command-line tools |
| (nmake, <EM>etc.</EM>..). Consult the VC++ manual to determine how to install |
| them.</P> |
| |
| <P>First, unpack the Apache distribution into an appropriate |
| directory. Open a command-line prompt, and change to the |
| <CODE>src</CODE> subdirectory of the Apache distribution.</P> |
| |
| <P>The master Apache makefile instructions are contained in the |
| <CODE>Makefile.win</CODE> file. To compile Apache on Windows, simply |
| use one of the following commands: |
| <UL> |
| <LI><CODE>nmake /f Makefile.win _apacher</CODE> (release build) |
| <LI><CODE>nmake /f Makefile.win _apached</CODE> (debug build) |
| </UL> |
| |
| <P>These will both compile Apache. The latter will include debugging |
| information in the resulting files, making it easier to find bugs and |
| track down problems.</P> |
| |
| <P>Apache can also be compiled using VC++'s Visual Studio development |
| environment. Although compiling Apache in this manner is not as |
| simple, it makes it possible to easily modify the Apache source, or |
| to compile Apache if the command-line tools are not installed. |
| Project files (<CODE>.DSP</CODE>) are included for each of the |
| portions of Apache. To build Apache from the these projects files |
| you will need to build the following projects <EM>in this order</EM>: |
| <STRONG> This needs updating for Apache 2.0 </STRONG> |
| <OL> |
| <LI><CODE>os\win32\ApacheOS.dsp</CODE> |
| <LI><CODE>regex\regex.dsp</CODE> |
| <LI><CODE>ap\ap.dsp</CODE> |
| <LI><CODE>main\gen_uri_delims.dsp</CODE> |
| <LI><CODE>main\gen_test_char.dsp</CODE> |
| <LI><CODE>ApacheCore.dsp</CODE> |
| <LI><CODE>Apache.dsp</CODE> |
| </OL> |
| |
| In addition, the <CODE>src\os\win32</CODE> subdirectory contains |
| project files for the optional modules (see below).</P> |
| |
| <P>Once Apache has been compiled, it needs to be installed in its server |
| root directory. The default is the <CODE>\Apache</CODE> |
| directory, on the current hard drive. </P> |
| |
| <P>To install the files into the <CODE>\Apache</CODE> directory |
| automatically, use one the following nmake commands (see above):</P> |
| <UL> |
| <LI><CODE>nmake /f Makefile.win installr INSTDIR=<EM>dir</EM></CODE> |
| (for release build) |
| <LI><CODE>nmake /f Makefile.win installd INSTDIR=<EM>dir</EM></CODE> |
| (for debug build) |
| </UL> |
| |
| The dir argument to INSTDIR gives the installation directory; it can |
| be omitted if Apache is to be installed into <SAMP>\Apache</SAMP>. |
| |
| <P>This will install the following:</P> |
| |
| <UL> |
| <LI><CODE><EM>dir</EM>\Apache.exe</CODE> - Apache executable |
| <LI><CODE><EM>dir</EM>\ApacheCore.dll</CODE> - Main Apache shared library |
| <LI><CODE><EM>dir</EM>\modules\ApacheModule*.dll</CODE> - Optional Apache |
| modules (7 files) |
| <LI><CODE><EM>dir</EM>\conf</CODE> - Empty configuration directory |
| <LI><CODE><EM>dir</EM>\logs</CODE> - Empty logging directory |
| </UL> |
| |
| <P>If you do not have nmake, or wish to install in a different directory, |
| be sure to use a similar naming scheme.</P> |
| |
| <P> |
| Before running the server you must fill out the conf directory. |
| Copy the *.conf-dist-win from the distribution conf directory |
| and rename *.conf. Edit the @@ServerRoot@@ entries to your |
| actual server root (for example "C:\apache"). Copy over |
| the conf/magic and conf/mime.types files as well. |
| |
| <!--#include virtual="footer.html" --> |
| </BODY> |
| </HTML> |