From: André Malo Date: Mon, 16 Sep 2002 15:41:31 +0000 (+0000) Subject: new XML X-Git-Tag: 2.0.42~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ace4271c174c56bdf01602a2d02624cdf276592f;p=thirdparty%2Fapache%2Fhttpd.git new XML Submitted by: Tim Gerundt git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96838 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/platform/win_compiling.html b/docs/manual/platform/win_compiling.html deleted file mode 100644 index ecfe11fcae1..00000000000 --- a/docs/manual/platform/win_compiling.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - Compiling Apache for Microsoft Windows - - - - - - -

Compiling Apache for Microsoft Windows

- -

There are many important points before you begin compiling - Apache. See Using Apache with Microsoft - Windows before you begin.

- -

Requirements

- -

Compiling Apache requires the following environment to be - properly installed;

- - - -

Command-Line - Build

- -

First, unpack the Apache distribution into an appropriate - directory. Open a command-line prompt and cd to that - directory.

- -

The master Apache makefile instructions are contained in the - Makefile.win file. To compile Apache on Windows - NT, simply use one of the following commands to compiled the - release or debug build, respectively:

-
-    nmake /f Makefile.win _apacher
-
-    nmake /f Makefile.win _apached
-
- -

Either command will compile Apache. The latter will include - debugging information in the resulting files, making it easier - to find bugs and track down problems.

- -

Developer - Studio Workspace IDE Build

- -

Apache can also be compiled using VC++'s VisualStudio - development environment. To simplify this process, a - VisualStudio workspace, Apache.dsw, is provided. This workspace - exposes the entire list of working .dsp projects that are - required for the complete Apache binary release. It includes - dependencies between the projects to assure that they are built - in the appropriate order.

- -

Open the Apache.dsw workspace, and select InstallBin - (Release or Debug build, as desired) as the Active Project. - InstallBin causes all related project to be built, and then - invokes Makefile.win to move the compiled executables and dlls. - You may personalize the INSTDIR= choice by changing - InstallBin's Settings, General tab, Build command line entry. - INSTDIR defaults to the /Apache2 directory. If you only want - a test compile (without installing) you may build the BuildBin - project instead.

- -

The .dsp project files are distributed in Visual C++ 6.0 - format. Visual C++ 5.0 (97) will recognize them. Visual C++ - 7.0 (.net) must convert Apache.dsw plus the .dsp files into an - Apache.sln plus .msproj files, be sure you reconvert the .msproj - file if any of the source .dsp files change! This is really - trivial, just open Apache.dsw in the VC++ 7.0 IDE once again.

- -

Visual C++ 7.0 (.net) users should also use the Build - menu, Configuration Manager dialog to uncheck both the - Debug and Release Solution modules abs, mod_ssl, and mod_deflate. - These modules are built by invoking nmake or the IDE directly with - the BinBuild target to build those modules explicitly, only if the - srclib directories openssl and/or zlib exist.

- -

Exported .mak files pose a greater hassle, but they are - required for Visual C++ 5.0 users to build mod_ssl, abs (ab - with SSL support) and/or mod_deflate. VC++ 7.0 (.net) users - also benefit, nmake builds are faster than binenv builds. - Build the entire project from within the VC++ 5.0 or 6.0 IDE, - then use the Project Menu Export for all makefiles. - You must build the projects first in order to create all dynamic - auto-generated targets, so that dependencies can be parsed - correctly. Run the following command to fix the paths so they - will build anywhere;

-
-     perl srclib\apr\build\fixwin32mak.pl
-
-

You must type this command from the top level - directory of the httpd source tree. Every .mak and .dep project - file within the current directory and below will be corrected, - and the timestamps adjusted to reflect the .dsp.

- -

If you contribute back a patch that revises project files, we - must commit project files in Visual Studio 6.0 format. Changes - should be simple, with minimal compilation and linkage flags that - will be recognized by all VC++ 5.0 through 7.0 environments.

- -

Project - Components

- -

The Apache.dsw workspace and makefile.win nmake script both - build the .dsp projects of the Apache server in the following - sequence:

- -
    -
  1. srclib\apr\apr.dsp
  2. - -
  3. srclib\apr\libapr.dsp
  4. - -
  5. srclib\apr-util\uri\gen_uri_delims.dsp
  6. - -
  7. srclib\apr-util\xml\expat\lib\xml.dsp
  8. - -
  9. srclib\apr-util\aprutil.dsp
  10. - -
  11. srclib\apr-util\libaprutil.dsp
  12. - -
  13. srclib\pcre\dftables.dsp
  14. - -
  15. srclib\pcre\pcre.dsp
  16. - -
  17. srclib\pcre\pcreposix.dsp
  18. - -
  19. server\gen_test_char.dsp
  20. - -
  21. libhttpd.dsp
  22. - -
  23. Apache.dsp
  24. -
- -

In addition, the modules\ subdirectory tree contains - project files for the majority of the modules.

- -

The support\ directory contains project files for - additional programs that are not part of the Apache runtime, - but are used by the administrator to test Apache and maintain - password and log files. Windows-specific support projects are - broken out in the support\win32\ directory.

- -
    -
  1. support\ab.dsp
  2. - -
  3. support\htdigest.dsp
  4. - -
  5. support\htpasswd.dsp
  6. - -
  7. support\logresolve.dsp
  8. - -
  9. support\rotatelogs.dsp
  10. - -
  11. support\win32\ApacheMonitor.dsp
  12. - -
  13. support\win32\wintty.dsp
  14. -
- -

Once Apache has been compiled, it needs to be installed in - its server root directory. The default is the - \Apache2 directory, of the same drive.

- -

To build and install all the files into the desired folder - dir automatically, use one of the following nmake - commands:

-
-    nmake /f Makefile.win installr INSTDIR=dir
-
-    nmake /f Makefile.win installd INSTDIR=dir
-
- The dir argument to INSTDIR gives the installation - directory; it can be omitted if Apache is to be installed into - \Apache2.
-
- - -

This will install the following:

- - - -

Warning about building Apache from the development - tree

- -

Note; only the .dsp files are maintained between release builds. - The .mak files are NOT regenerated, due to the tremendous waste - of reviewer's time. Therefore, you cannot rely on the NMAKE - commands above to build revised .dsp project files unless you - then export all .mak files yourself from the project. This is - unnecessary if you build from within the Microsoft - Developer Studio environment.

- -

Note: it is very worthwhile to build the - BuildBin target project (or the command line _apacher or _apached - target) prior to exporting the make files. Many files are - autogenerated in the build process. Only a full build provides - all of the dependent files required to build proper dependency - trees for correct build behavior.

- -

In order to create distribution .mak files, always review - the generated .mak (or .dep) dependencies for Platform SDK or - other garbage includes. The DevStudio\SharedIDE\bin\ (VC5) or - DevStudio\Common\MSDev98\bin\ (VC6) directory contains the - sysincl.dat file, which must list all exceptions. Update this - file (including both forward and backslashed paths, such as - both sys/time.h and sys\time.h) to include such dependencies. - Including local-install paths in a distributed .mak file will - cause the build to fail completely. And don't forget to run - srclib/apr/build/fixwin32mak.pl in order to fix absolute - paths within the .mak files.

- - - diff --git a/docs/manual/platform/win_compiling.html.en b/docs/manual/platform/win_compiling.html.en new file mode 100644 index 00000000000..c2fbf171471 --- /dev/null +++ b/docs/manual/platform/win_compiling.html.en @@ -0,0 +1,386 @@ + + +Compiling Apache for Microsoft Windows - Apache HTTP Server
<-

Compiling Apache for Microsoft Windows

+ +

There are many important points before you begin compiling + Apache. See Using Apache with Microsoft + Windows before you begin.

+ +
top

Requirements

+ + + +

Compiling Apache requires the following environment to be + properly installed:

+ +
    +
  • +

    Disk Space

    +

    Make sure you have at least 50 MB of free disk space + available. After installation Apache requires approximately + 10 MB of disk space, plus space for log and cache files, + which can grow rapidly. The actual disk space requirements + will vary considerably based on your chosen configuration and + any third-party modules or libraries.

    +
  • + +
  • +

    Microsoft Visual C++ 5.0 or higher.

    +

    Apache can be built using the command line tools, or from + within the Visual Studio IDE Workbench. The command line + build requires the environment to reflect the PATH, + INCLUDE, LIB and other variables + that can be configured with the vcvars32 batch file:

    + +

    + "c:\Program Files\DevStudio\VC\Bin\vcvars32.bat" +

    +
  • + +
  • +

    The Windows Platform SDK.

    +

    Visual C++ 5.0 builds require an updated Microsoft Windows + Platform SDK to enable some Apache features. For command line + builds, the Platform SDK environment is prepared by the + setenv batch file:

    + +

    + "c:\Program Files\Platform SDK\setenv.bat" +

    + +

    The Platform SDK files distributed with Visual C++ 6.0 and + later are sufficient, so users of later version may skip + this requirement.

    + +
    Note that the Windows Platform SDK update is required + to enable all supported mod_isapi features. + Without a recent update, Apache will issue warnings under + MSVC++ 5.0 that some mod_isapi features + will be disabled. Look for the update at http://msdn.microsoft.com/downloads/sdks/platform/platform.asp.
    +
  • + +
  • +

    The awk utility (awk, gawk or similar).

    +

    To install Apache within the build system, several files are + modified using the awk.exe utility. awk was chosen since it + is a very small download (compared with Perl or WSH/VB) and + accomplishes the task of generating files. Brian Kernighan's + http://cm.bell-labs.com/cm/cs/who/bwk/ + site has a compiled native Win32 binary, + http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe which + you must save with the name awk.exe rather than + awk95.exe.

    + +
    Note that Developer Studio IDE will only find + awk.exe from the Tools menu Options... Directories + tab (the Projects - VC++ Directories pane in Developer Studio 7.0) + listing Executable file paths. Add the path for awk.exe + to this list, and your system PATH environment variable, + as needed.
    + +
    Also note that if you are using Cygwin (http://www.cygwin.com/) the awk utility is named gawk.exe and + that the file awk.exe is really a symlink to the gawk.exe + file. The Windows command shell does not recognize symlinks, and because of that + building InstallBin will fail. A workaround is to delete awk.exe from + the cygwin installation and rename gawk.exe to awk.exe.
    +
  • + +
  • +

    [Optional] OpenSSL libraries (for mod_ssl + and ab.exe with ssl support)

    +

    Caution: there are significant restrictions and + prohibitions on the use and distribution of strong cryptography + and patented intellectual property throughout the world. + OpenSSL includes strong cryptography controlled by both export + regulations and domestic law, as well as intellectual property + protected by patent, in the United States and elsewhere. Neither + the Apache Software Foundation nor the OpenSSL project can provide + legal advise regarding possession, use, or distribution of the code + provided by the OpenSSL project. Consult your own legal + counsel, you are responsible for your own actions.

    + +

    OpenSSL must be installed into a srclib subdirectory named + openssl, obtained from http://www.openssl.org/source/, in order to compile mod_ssl + or the abs project (ab.exe with SSL support.) To prepare OpenSSL + for both release and debug builds of Apache, and + disable the patent protected features in 0.9.6, you might use the following + build commands:

    + +

    + perl util\mkfiles.pl >MINFO
    + perl util\mk1mf.pl dll no-asm no-mdc2 no-rc5 no-idea VC-WIN32 >makefile
    + perl util\mk1mf.pl dll debug no-asm no-mdc2 no-rc5 no-idea VC-WIN32 >makefile.dbg
    + perl util\mkdef.pl 32 libeay no-asm no-mdc2 no-rc5 no-idea >ms\libeay32.def
    + perl util\mkdef.pl 32 ssleay no-asm no-mdc2 no-rc5 no-idea >ms\ssleay32.def
    + nmake
    + nmake -f makefile.dbg +

    + +
  • + +
  • +

    [Optional] zlib sources (for mod_deflate)

    +

    Zlib must be installed into a srclib subdirectory named + zlib, however those sources need not be compiled. The build system + will compile the compression sources directly into the mod_deflate + module. Zlib can be obtained from http://www.gzip.org/zlib/ -- mod_deflate is + confirmed to build correctly with version 1.1.4.

    +
  • + +
+ +
top

Command-Line Build

+ + + +

First, unpack the Apache distribution into an appropriate + directory. Open a command-line prompt and cd to that + directory.

+ +

The master Apache makefile instructions are contained in the + Makefile.win file. To compile Apache on Windows + NT, simply use one of the following commands to compiled the + release or debug build, respectively:

+ +
+nmake /f Makefile.win _apacher
+
+nmake /f Makefile.win _apached
+    
+ +

Either command will compile Apache. The latter will include + debugging information in the resulting files, making it easier + to find bugs and track down problems.

+ +
top

Developer Studio Workspace IDE Build

+ + + +

Apache can also be compiled using VC++'s Visual Studio + development environment. To simplify this process, a + Visual Studio workspace, Apache.dsw, is provided. + This workspace exposes the entire list of working .dsp + projects that are required for the complete Apache binary release. + It includes dependencies between the projects to assure that they + are built in the appropriate order.

+ +

Open the Apache.dsw workspace, and select + InstallBin (Release or Debug build, + as desired) as the Active Project. InstallBin causes all + related project to be built, and then invokes Makefile.win to + move the compiled executables and dlls. You may personalize the + INSTDIR= choice by changing InstallBin's Settings, + General tab, Build command line entry. INSTDIR defaults to the + /Apache2 directory. If you only want a test compile (without + installing) you may build the BuildBin project instead.

+ +

The .dsp project files are distributed in Visual + C++ 6.0 format. Visual C++ 5.0 (97) will recognize them. Visual C++ + 7.0 (.net) must convert Apache.dsw plus the .dsp + files into an Apache.sln plus .msproj files, + be sure you reconvert the .msproj file if any of the source + .dsp files change! This is really trivial, just open + Apache.dsw in the VC++ 7.0 IDE once again.

+ +

Visual C++ 7.0 (.net) users should also use the Build + menu, Configuration Manager dialog to uncheck both the Debug + and Release Solution modules abs, mod_ssl + and mod_deflate. + These modules are built by invoking nmake or the IDE directly + with the BinBuild target to build those modules explicitly, + only if the srclib directories openssl + and/or zlib exist.

+ +

Exported .mak files pose a greater hassle, but they are + required for Visual C++ 5.0 users to build mod_ssl, + abs (ab with SSL support) and/or mod_deflate. + VC++ 7.0 (.net) users also benefit, nmake builds + are faster than binenv builds. + Build the entire project from within the VC++ 5.0 or 6.0 IDE, + then use the Project Menu Export for all makefiles. + You must build the projects first in order to create all dynamic + auto-generated targets, so that dependencies can be parsed + correctly. Run the following command to fix the paths so they + will build anywhere:

+ +

+ perl srclib\apr\build\fixwin32mak.pl +

+ +

You must type this command from the top level + directory of the httpd source tree. Every + .mak and .dep project file within + the current directory and below will be corrected, and the + timestamps adjusted to reflect the .dsp.

+ +

If you contribute back a patch that revises project files, we + must commit project files in Visual Studio 6.0 format. Changes + should be simple, with minimal compilation and linkage flags that + will be recognized by all VC++ 5.0 through 7.0 environments.

+ +
top

Project Components

+ + + +

The Apache.dsw workspace and makefile.win + nmake script both build the .dsp projects + of the Apache server in the following sequence:

+ +
    +
  1. srclib\apr\apr.dsp
  2. + +
  3. srclib\apr\libapr.dsp
  4. + +
  5. srclib\apr-util\uri\gen_uri_delims.dsp
  6. + +
  7. srclib\apr-util\xml\expat\lib\xml.dsp
  8. + +
  9. srclib\apr-util\aprutil.dsp
  10. + +
  11. srclib\apr-util\libaprutil.dsp
  12. + +
  13. srclib\pcre\dftables.dsp
  14. + +
  15. srclib\pcre\pcre.dsp
  16. + +
  17. srclib\pcre\pcreposix.dsp
  18. + +
  19. server\gen_test_char.dsp
  20. + +
  21. libhttpd.dsp
  22. + +
  23. Apache.dsp
  24. +
+ +

In addition, the modules\ subdirectory tree contains + project files for the majority of the modules.

+ +

The support\ directory contains project files for + additional programs that are not part of the Apache runtime, + but are used by the administrator to test Apache and maintain + password and log files. Windows-specific support projects are + broken out in the support\win32\ directory.

+ +
    +
  1. support\ab.dsp
  2. + +
  3. support\htdigest.dsp
  4. + +
  5. support\htpasswd.dsp
  6. + +
  7. support\logresolve.dsp
  8. + +
  9. support\rotatelogs.dsp
  10. + +
  11. support\win32\ApacheMonitor.dsp
  12. + +
  13. support\win32\wintty.dsp
  14. +
+ +

Once Apache has been compiled, it needs to be installed in + its server root directory. The default is the + \Apache2 directory, of the same drive.

+ +

To build and install all the files into the desired folder + dir automatically, use one of the following + nmake commands:

+ +
+nmake /f Makefile.win installr INSTDIR=dir
+
+nmake /f Makefile.win installd INSTDIR=dir
+    
+ +

The dir argument to INSTDIR gives + the installation directory; it can be omitted if Apache is + to be installed into \Apache2.

+ +

This will install the following:

+ +
    +
  • dir\bin\Apache.exe - Apache + executable
  • + +
  • dir\bin\ApacheMonitor.exe - Service + monitor taskbar icon utility
  • + +
  • dir\bin\htdigest.exe - Digest auth + password file utility
  • + +
  • dir\bin\htdbm.exe - SDBM auth + database password file utility
  • + +
  • dir\bin\htpasswd.exe - Basic auth + password file utility
  • + +
  • dir\bin\logresolve.exe - Log file + dns name lookup utility
  • + +
  • dir\bin\rotatelogs.exe - Log file + cycling utility
  • + +
  • dir\bin\wintty.exe - Console window + utility
  • + +
  • dir\bin\libapr.dll - Apache + Portable Runtime shared library
  • + +
  • dir\bin\libaprutil.dll - Apache + Utility Runtime shared library
  • + +
  • dir\bin\libhttpd.dll - Apache Core + library
  • + +
  • dir\modules\mod_*.so - Loadable + Apache modules
  • + +
  • dir\conf - Configuration + directory
  • + +
  • dir\logs - Empty logging + directory
  • + +
  • dir\include - C language header + files
  • + +
  • dir\lib - Link library files
  • +
+ +

Warning about building Apache from the development tree

+ + + +
Note only the .dsp files are maintained between release + builds. The .mak files are NOT regenerated, due to the tremendous + waste of reviewer's time. Therefore, you cannot rely on the NMAKE + commands above to build revised .dsp project files unless you + then export all .mak files yourself from the project. This is + unnecessary if you build from within the Microsoft + Developer Studio environment.
+ +
Also note it is very worthwhile to build the BuildBin + target project (or the command line _apacher or + _apached target) prior to exporting the make files. + Many files are autogenerated in the build process. Only a full + build provides all of the dependent files required to build proper + dependency trees for correct build behavior.
+ +

In order to create distribution .mak files, always review + the generated .mak (or .dep) dependencies for + Platform SDK or other garbage includes. The DevStudio\SharedIDE\bin\ + (VC5) or DevStudio\Common\MSDev98\bin\ (VC6) directory contains + the sysincl.dat file, which must list all exceptions. Update this + file (including both forward and backslashed paths, such as both + sys/time.h and sys\time.h) to include such dependencies. + Including local-install paths in a distributed .mak file will + cause the build to fail completely. And don't forget to run + srclib/apr/build/fixwin32mak.pl in order to fix absolute + paths within the .mak files.

+ + + +
\ No newline at end of file diff --git a/docs/manual/platform/win_compiling.xml b/docs/manual/platform/win_compiling.xml new file mode 100644 index 00000000000..bdc516b16fb --- /dev/null +++ b/docs/manual/platform/win_compiling.xml @@ -0,0 +1,407 @@ + + + + + + + + Compiling Apache for Microsoft Windows + + + +

There are many important points before you begin compiling + Apache. See Using Apache with Microsoft + Windows before you begin.

+ +
+ +
+ + Requirements + +

Compiling Apache requires the following environment to be + properly installed:

+ +
    +
  • +

    Disk Space

    +

    Make sure you have at least 50 MB of free disk space + available. After installation Apache requires approximately + 10 MB of disk space, plus space for log and cache files, + which can grow rapidly. The actual disk space requirements + will vary considerably based on your chosen configuration and + any third-party modules or libraries.

    +
  • + +
  • +

    Microsoft Visual C++ 5.0 or higher.

    +

    Apache can be built using the command line tools, or from + within the Visual Studio IDE Workbench. The command line + build requires the environment to reflect the PATH, + INCLUDE, LIB and other variables + that can be configured with the vcvars32 batch file:

    + + + "c:\Program Files\DevStudio\VC\Bin\vcvars32.bat" + +
  • + +
  • +

    The Windows Platform SDK.

    +

    Visual C++ 5.0 builds require an updated Microsoft Windows + Platform SDK to enable some Apache features. For command line + builds, the Platform SDK environment is prepared by the + setenv batch file:

    + + + "c:\Program Files\Platform SDK\setenv.bat" + + +

    The Platform SDK files distributed with Visual C++ 6.0 and + later are sufficient, so users of later version may skip + this requirement.

    + + Note that the Windows Platform SDK update is required + to enable all supported mod_isapi features. + Without a recent update, Apache will issue warnings under + MSVC++ 5.0 that some mod_isapi features + will be disabled. Look for the update at http://msdn.microsoft.com/downloads/sdks/platform/platform.asp. +
  • + +
  • +

    The awk utility (awk, gawk or similar).

    +

    To install Apache within the build system, several files are + modified using the awk.exe utility. awk was chosen since it + is a very small download (compared with Perl or WSH/VB) and + accomplishes the task of generating files. Brian Kernighan's + http://cm.bell-labs.com/cm/cs/who/bwk/ + site has a compiled native Win32 binary, + http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe which + you must save with the name awk.exe rather than + awk95.exe.

    + + Note that Developer Studio IDE will only find + awk.exe from the Tools menu Options... Directories + tab (the Projects - VC++ Directories pane in Developer Studio 7.0) + listing Executable file paths. Add the path for awk.exe + to this list, and your system PATH environment variable, + as needed. + + Also note that if you are using Cygwin (http://www.cygwin.com/) the awk utility is named gawk.exe and + that the file awk.exe is really a symlink to the gawk.exe + file. The Windows command shell does not recognize symlinks, and because of that + building InstallBin will fail. A workaround is to delete awk.exe from + the cygwin installation and rename gawk.exe to awk.exe. +
  • + +
  • +

    [Optional] OpenSSL libraries (for mod_ssl + and ab.exe with ssl support)

    +

    Caution: there are significant restrictions and + prohibitions on the use and distribution of strong cryptography + and patented intellectual property throughout the world. + OpenSSL includes strong cryptography controlled by both export + regulations and domestic law, as well as intellectual property + protected by patent, in the United States and elsewhere. Neither + the Apache Software Foundation nor the OpenSSL project can provide + legal advise regarding possession, use, or distribution of the code + provided by the OpenSSL project. Consult your own legal + counsel, you are responsible for your own actions.

    + +

    OpenSSL must be installed into a srclib subdirectory named + openssl, obtained from http://www.openssl.org/source/, in order to compile mod_ssl + or the abs project (ab.exe with SSL support.) To prepare OpenSSL + for both release and debug builds of Apache, and + disable the patent protected features in 0.9.6, you might use the following + build commands:

    + + + perl util\mkfiles.pl >MINFO
    + perl util\mk1mf.pl dll no-asm no-mdc2 no-rc5 no-idea VC-WIN32 >makefile
    + perl util\mk1mf.pl dll debug no-asm no-mdc2 no-rc5 no-idea VC-WIN32 >makefile.dbg
    + perl util\mkdef.pl 32 libeay no-asm no-mdc2 no-rc5 no-idea >ms\libeay32.def
    + perl util\mkdef.pl 32 ssleay no-asm no-mdc2 no-rc5 no-idea >ms\ssleay32.def
    + nmake
    + nmake -f makefile.dbg +
    + +
  • + +
  • +

    [Optional] zlib sources (for mod_deflate)

    +

    Zlib must be installed into a srclib subdirectory named + zlib, however those sources need not be compiled. The build system + will compile the compression sources directly into the mod_deflate + module. Zlib can be obtained from http://www.gzip.org/zlib/ -- mod_deflate is + confirmed to build correctly with version 1.1.4.

    +
  • + +
+ +
+ +
+ + Command-Line Build + +

First, unpack the Apache distribution into an appropriate + directory. Open a command-line prompt and cd to that + directory.

+ +

The master Apache makefile instructions are contained in the + Makefile.win file. To compile Apache on Windows + NT, simply use one of the following commands to compiled the + release or debug build, respectively:

+ +
+nmake /f Makefile.win _apacher
+
+nmake /f Makefile.win _apached
+    
+ +

Either command will compile Apache. The latter will include + debugging information in the resulting files, making it easier + to find bugs and track down problems.

+ +
+ +
+ + Developer Studio Workspace IDE Build + +

Apache can also be compiled using VC++'s Visual Studio + development environment. To simplify this process, a + Visual Studio workspace, Apache.dsw, is provided. + This workspace exposes the entire list of working .dsp + projects that are required for the complete Apache binary release. + It includes dependencies between the projects to assure that they + are built in the appropriate order.

+ +

Open the Apache.dsw workspace, and select + InstallBin (Release or Debug build, + as desired) as the Active Project. InstallBin causes all + related project to be built, and then invokes Makefile.win to + move the compiled executables and dlls. You may personalize the + INSTDIR= choice by changing InstallBin's Settings, + General tab, Build command line entry. INSTDIR defaults to the + /Apache2 directory. If you only want a test compile (without + installing) you may build the BuildBin project instead.

+ +

The .dsp project files are distributed in Visual + C++ 6.0 format. Visual C++ 5.0 (97) will recognize them. Visual C++ + 7.0 (.net) must convert Apache.dsw plus the .dsp + files into an Apache.sln plus .msproj files, + be sure you reconvert the .msproj file if any of the source + .dsp files change! This is really trivial, just open + Apache.dsw in the VC++ 7.0 IDE once again.

+ +

Visual C++ 7.0 (.net) users should also use the Build + menu, Configuration Manager dialog to uncheck both the Debug + and Release Solution modules abs, mod_ssl + and mod_deflate. + These modules are built by invoking nmake or the IDE directly + with the BinBuild target to build those modules explicitly, + only if the srclib directories openssl + and/or zlib exist.

+ +

Exported .mak files pose a greater hassle, but they are + required for Visual C++ 5.0 users to build mod_ssl, + abs (ab with SSL support) and/or mod_deflate. + VC++ 7.0 (.net) users also benefit, nmake builds + are faster than binenv builds. + Build the entire project from within the VC++ 5.0 or 6.0 IDE, + then use the Project Menu Export for all makefiles. + You must build the projects first in order to create all dynamic + auto-generated targets, so that dependencies can be parsed + correctly. Run the following command to fix the paths so they + will build anywhere:

+ + + perl srclib\apr\build\fixwin32mak.pl + + +

You must type this command from the top level + directory of the httpd source tree. Every + .mak and .dep project file within + the current directory and below will be corrected, and the + timestamps adjusted to reflect the .dsp.

+ +

If you contribute back a patch that revises project files, we + must commit project files in Visual Studio 6.0 format. Changes + should be simple, with minimal compilation and linkage flags that + will be recognized by all VC++ 5.0 through 7.0 environments.

+ +
+ +
+ + Project Components + +

The Apache.dsw workspace and makefile.win + nmake script both build the .dsp projects + of the Apache server in the following sequence:

+ +
    +
  1. srclib\apr\apr.dsp
  2. + +
  3. srclib\apr\libapr.dsp
  4. + +
  5. srclib\apr-util\uri\gen_uri_delims.dsp
  6. + +
  7. srclib\apr-util\xml\expat\lib\xml.dsp
  8. + +
  9. srclib\apr-util\aprutil.dsp
  10. + +
  11. srclib\apr-util\libaprutil.dsp
  12. + +
  13. srclib\pcre\dftables.dsp
  14. + +
  15. srclib\pcre\pcre.dsp
  16. + +
  17. srclib\pcre\pcreposix.dsp
  18. + +
  19. server\gen_test_char.dsp
  20. + +
  21. libhttpd.dsp
  22. + +
  23. Apache.dsp
  24. +
+ +

In addition, the modules\ subdirectory tree contains + project files for the majority of the modules.

+ +

The support\ directory contains project files for + additional programs that are not part of the Apache runtime, + but are used by the administrator to test Apache and maintain + password and log files. Windows-specific support projects are + broken out in the support\win32\ directory.

+ +
    +
  1. support\ab.dsp
  2. + +
  3. support\htdigest.dsp
  4. + +
  5. support\htpasswd.dsp
  6. + +
  7. support\logresolve.dsp
  8. + +
  9. support\rotatelogs.dsp
  10. + +
  11. support\win32\ApacheMonitor.dsp
  12. + +
  13. support\win32\wintty.dsp
  14. +
+ +

Once Apache has been compiled, it needs to be installed in + its server root directory. The default is the + \Apache2 directory, of the same drive.

+ +

To build and install all the files into the desired folder + dir automatically, use one of the following + nmake commands:

+ +
+nmake /f Makefile.win installr INSTDIR=dir
+
+nmake /f Makefile.win installd INSTDIR=dir
+    
+ +

The dir argument to INSTDIR gives + the installation directory; it can be omitted if Apache is + to be installed into \Apache2.

+ +

This will install the following:

+ +
    +
  • dir\bin\Apache.exe - Apache + executable
  • + +
  • dir\bin\ApacheMonitor.exe - Service + monitor taskbar icon utility
  • + +
  • dir\bin\htdigest.exe - Digest auth + password file utility
  • + +
  • dir\bin\htdbm.exe - SDBM auth + database password file utility
  • + +
  • dir\bin\htpasswd.exe - Basic auth + password file utility
  • + +
  • dir\bin\logresolve.exe - Log file + dns name lookup utility
  • + +
  • dir\bin\rotatelogs.exe - Log file + cycling utility
  • + +
  • dir\bin\wintty.exe - Console window + utility
  • + +
  • dir\bin\libapr.dll - Apache + Portable Runtime shared library
  • + +
  • dir\bin\libaprutil.dll - Apache + Utility Runtime shared library
  • + +
  • dir\bin\libhttpd.dll - Apache Core + library
  • + +
  • dir\modules\mod_*.so - Loadable + Apache modules
  • + +
  • dir\conf - Configuration + directory
  • + +
  • dir\logs - Empty logging + directory
  • + +
  • dir\include - C language header + files
  • + +
  • dir\lib - Link library files
  • +
+ +
+ + Warning about building Apache from the development tree + + Note only the .dsp files are maintained between release + builds. The .mak files are NOT regenerated, due to the tremendous + waste of reviewer's time. Therefore, you cannot rely on the NMAKE + commands above to build revised .dsp project files unless you + then export all .mak files yourself from the project. This is + unnecessary if you build from within the Microsoft + Developer Studio environment. + + Also note it is very worthwhile to build the BuildBin + target project (or the command line _apacher or + _apached target) prior to exporting the make files. + Many files are autogenerated in the build process. Only a full + build provides all of the dependent files required to build proper + dependency trees for correct build behavior. + +

In order to create distribution .mak files, always review + the generated .mak (or .dep) dependencies for + Platform SDK or other garbage includes. The DevStudio\SharedIDE\bin\ + (VC5) or DevStudio\Common\MSDev98\bin\ (VC6) directory contains + the sysincl.dat file, which must list all exceptions. Update this + file (including both forward and backslashed paths, such as both + sys/time.h and sys\time.h) to include such dependencies. + Including local-install paths in a distributed .mak file will + cause the build to fail completely. And don't forget to run + srclib/apr/build/fixwin32mak.pl in order to fix absolute + paths within the .mak files.

+ +
+ +
+ +
+ diff --git a/docs/manual/platform/win_service.html.en b/docs/manual/platform/win_service.html.en new file mode 100644 index 00000000000..699bf861e4e --- /dev/null +++ b/docs/manual/platform/win_service.html.en @@ -0,0 +1,371 @@ + + +Running Apache for Windows as a Service - Apache HTTP Server
<-

Running Apache for Windows as a Service

+ +

Apache can be run as a service on Windows NT/2000. (There is + also some HIGHLY EXPERIMENTAL support for similar behavior on + Windows 95/98, introduced with Apache + 1.3.13).

+ +

Installing Apache as a service should only be done once you + can successfully run it in a console window. See Using Apache with Microsoft Windows + before you attempt to install or run Apache as a service. + Changes to the httpd.conf file should always be + followed by starting Apache as a console window. If this + succeeds, the service should succeed.

+ +
Prior to version 1.3.13, the configuration was + not tested prior to performing the + installation, and a lack of service dependencies often + caused the console window to succeed, but the service would + still fail. See below if you are having + problems running a version of Apache prior to 1.3.13 to resolve + the issue. If you have this problem with version 1.3.13 or + greater, first try uninstalling (-u) and re-installing + (-i) the Apache service.
+ +

To start Apache as a service, you first need to install it + as a service. Multiple Apache services can be installed, each + with a different name and configuration. To install the default + Apache service named "Apache", run the "Install Apache as + Service (NT only)" option from the Start menu. Once this is + done you can start the "Apache" service by opening the Services + window (in the Control Panel), selecting Apache, then clicking + on Start. Apache will now be running, hidden in the background. + You can later stop Apache by clicking on Stop. As an + alternative to using the Services window, you can start and + stop the "Apache" service from the command line with

+ +

+ NET START APACHE
+ NET STOP APACHE +

+ +

See Controlling Apache as a Service + for more information on installing and controlling Apache + services.

+ +

Note

+ Apache, unlike many other Windows NT/2000 services, + logs any errors to its own error.log file in the logs folder + within the Apache server root folder. You will not + find Apache error details in the Windows NT Event + Log.
+ +

After starting Apache as a service (or if you have trouble + starting it) you can test it using the same procedure as for running in a + console window. Remember to use the command:

+ +

+ apache -n "service name" +

+ +

to assure you are using the service's configuration.

+ +
top

Running Apache for Windows as a Service

+ + + +
The -n option to specify a service + name is only available with Apache 1.3.7 and later. + Earlier versions of Apache only support the default service name + "Apache".
+ +

You can install Apache as a Windows NT service as + follows:

+ +

+ apache -i -n "service name" +

+ +

To install a service to use a particular configuration, + specify the configuration file when the service is + installed:

+ +

+ apache -i -n "service name" -f "\my server\conf\my.conf" +

+ +

To remove an Apache service, use:

+ +

+ apache -u -n "service name" +

+ +

The default "service name", if one is not specified, is + "Apache".

+ +

Once a service is installed, you can use the -n + option, in conjunction with other options, to refer to a + service's configuration file. For example:

+ +

To test a service's configuration file:

+ +

+ apache -n "service name" -t +

+ +

To start a console Apache using a service's configuration + file:

+ +

+ apache -n "service name" +

+ +
top

Important Note on service dependencies:

+ + + +

Prior to Apache release 1.3.13, the dependencies required to + successfully start an installed service were not configured. + After installing a service using earlier versions of Apache, + you must follow these steps:

+ +

+ Run regedt32
+ Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
+ Double-click to open the SYSTEM, then the CurrentControlSet keys
+ Scroll down and click on the Apache servicename
+ Select Edit - Add Value... from the menu
+ Fill in the Add Value dialog with
+     Value Name: DependOnGroup
+     Data Type: REG_MULTI_SZ
+     and click OK
+ Leave the Multi-String Editor dialog empty and click OK
+ Select Edit - Add Value... from the menu
+ Fill in the Add Value dialog with
+     Value Name: DependOnService
+     Data Type: REG_MULTI_SZ
+     and click OK
+ Type the following list (one per line) in the Multi-String Editor dialog
+     Tcpip
+     Afd
+     and click OK
+

+ +

If you are using COM or DCOM components from a third party + module, ISAPI, or other add-in scripting technologies such as + ActiveState Perl, you may also need to add the entry Rpcss to + the DependOnService list. To avoid exposing the TCP port 135 + when it is unnecessary, Apache does not create that entry upon + installation. Follow the directions above to find or create the + DependOnService value, double click that value if it already + exists, and add the Rpcss entry to the list.

+ +
top

User Account for Apache Service to Run As (NT/2000)

+ + + +

When Apache is first installed as a service (e.g. with the + -i option) it will run as user "System" (the LocalSystem + account). There should be few issues if all resources for the + web server reside on the local system, but it has broad + security privileges to affect the local machine!

+ +
LocalSystem is a very privileged account locally, so you + shouldn't run any shareware applications there. However, it + has no network privileges and cannot leave the machine via + any NT-secured mechanism, including file system, named pipes, + DCOM, or secure RPC.
+ +

NEVER grant network privileges to the SYSTEM + account! Create a new user account instead, grant the + appropriate privileges to that user, and use the the "Log On + As:" option. Select the Start Menu -> Settings -> Control + Panel -> Services -> apache service ... and click the + "Startup" button to access this setting.

+ +
A service that runs in the context of the LocalSystem account + inherits the security context of the SCM. It is not + associated with any logged-on user account and does not have + credentials (domain name, user name, and password) to be used + for verification.
+ +

The SYSTEM account has no privileges to the network, so + shared pages or a shared installation of Apache is invisible to + the service. If you intend to use any network + resources, the following steps should help:

+ +
    +
  • Select Apache from the Control Panel's Service dialog and + click Startup.
  • + +
  • Verify that the service account is correct. You may wish + to create an account for your Apache services.
  • + +
  • Retype the password and password confirmation.
  • + +
  • Go to User Manager for Domains.
  • + +
  • Click on Policies from the title bar menu, and select + User Rights.
  • + +
  • Select the option for Advanced User Rights.
  • + +
  • + In the drop-down list, verify that the following rights + have been granted to the selected account: + +
      +
    • Act as part of the operating system
    • + +
    • Back up files and directories
    • + +
    • Log on as a service
    • + +
    • Restore files and directories
    • +
    +
  • + +
  • Confirm that the selected account is a member of the + Users group.
  • + +
  • Confirm the selected account has access to all + document and script + directories (minimally read and browse access).
  • + +
  • Confirm the selected account has read/write/delete access + to the Apache logs directory!
  • +
+ +

If you allow the account to log in as a user, then you can + log in yourself and test that the account has the privileges to + execute the scripts, read the web pages, and that you can start + Apache in a console window. If this works, and you have + followed the steps above, Apache should execute as a service + with no problems.

+ +
Error code 2186 is a good indication + that you need to review the "Log On As" configuration, since + the server can't access a required network resource.
+ +
top

Troubleshooting Apache for Windows as a Service

+ + + +

When starting Apache as a service you may encounter an error + message from Windows service manager. For example if you try to + start Apache using the Services applet in Windows Control Panel + you may get the following message:

+ +

+ Could not start the apache service on \\COMPUTER
+ Error 1067; The process terminated unexpectedly. +

+ +

You will get this error if there is any problem starting + Apache. In order to see what is causing the problem you should + follow the instructions for Running Apache for Windows from the + Command Line.

+ +

Also, Apache 1.3.13 now records startup errors in the + Application Event Log under Windows NT/2000, if Apache is run + as a service. Run the Event Viewer and select Log ... + Application to see these events.

+ +
Check the Application Event Log with the Event + Viewer in case of any problems, even if no error message pops + up to warn you that an error occured.
+ +
top

Running Apache for Windows from the Command Line

+ + + +

For details on controlling Apache service from the command + line, please refer to console + command line section.

+ +
top

Controlling Apache as a Service

+ + + +

Multiple instances of Apache can be installed and run as + services. Signal an installed Apache service to start, restart, + or shutdown/stop as follows:

+ +

+ apache -n "service name" -k start
+ apache -n "service name" -k restart
+ apache -n "service name" -k shutdown
+ apache -n "service name" -k stop +

+ +

For the default "Apache" service, the -n Apache + option is still required, since the -k commands without + the -n option are directed at Apache running in a console + window. The quotes are only required if the service name contains spaces.

+ +
Note the -k stop alias for the + -k shutdown command was introduced in Apache version + 1.3.13. Earlier versions of Apache will only recognize the + -k shutdown option. Prior to 1.3.3, Apache did not + recognize any -k options at all!
+ +

In addition, you can use the native NT NET command + to start and stop Apache services as follows:

+ +

+ NET START "service name"
+ NET STOP "service name" +

+ +

Again, quotes are only required if the service name contains + spaces.

+ +
top

HIGHLY EXPERIMENTAL Windows 95/98 Service

+ + + +
The service options for Windows 95 and 98 are + only available with Apache 1.3.13 and later. Earlier + versions of Apache only supported Apache in a console window + for Windows 95/98.
+ +

There is some support for Apache on Windows 95/98 to behave + in a similar manner as a service on Windows NT/2000. It is + highly experimental, if it works (at all) the Apache + Sofware Foundation will not attest to its reliability or + future support. Proceed at your own risk!

+ +

Once you have confirmed that Apache runs correctly at the Command Prompt you can install, + control and uninstall it with the same commands as the Windows + NT/2000 version.

+ +

There are, however, significant differences that you should + note:

+ +

Apache will attempt to start and if successful it will run + in the background. If you run the command

+ +

+ Apache -n "service name" -k start +

+ +

via a shortcut on your desktop, for example, then if the + service starts successfully a console window will flash up but + immediately disappears. If Apache detects any errors on startup + such as a incorrect entries in the httpd.conf file, + then the console window will remain visible. This will display + an error message which will be useful in tracking down the cause + of the problem.

+ +

Windows 95/98 does not support NET START or + NET STOP commands so you must use Apache's Service + Control options at a command prompt. You may wish to set up a + shortcut for each of these commands so that you can just choose + it from the start menu or desktop to perform the required action.

+ +

Apache and Windows 95/98 offer no support for running the + Apache service as a specific user with network privileges. In + fact, Windows 95/98 offers no security on the local machine, + either. This is the simple reason that the Apache Software + Foundation never endorses the use of Windows 95/98 as a public + httpd server. These facilities exist only to assist the user in + developing web content and learning the Apache server, and + perhaps as a intranet server on a secured, private network.

+ +
\ No newline at end of file diff --git a/docs/manual/platform/win_service.html b/docs/manual/platform/win_service.xml similarity index 54% rename from docs/manual/platform/win_service.html rename to docs/manual/platform/win_service.xml index 70c324231fd..609d99040b6 100644 --- a/docs/manual/platform/win_service.html +++ b/docs/manual/platform/win_service.xml @@ -1,19 +1,13 @@ - + + + - - - + + - Running Apache for Windows as a Service - - - - - + Running Apache for Windows as a Service -

Running Apache for Windows as a Service

+

Apache can be run as a service on Windows NT/2000. (There is also some HIGHLY EXPERIMENTAL support for similar behavior on @@ -24,20 +18,19 @@ can successfully run it in a console window. See Using Apache with Microsoft Windows before you attempt to install or run Apache as a service. - Changes to the httpd.conf file should always be followed by - starting Apache as a console window. If this succeeds, the - service should succeed.

+ Changes to the httpd.conf file should always be + followed by starting Apache as a console window. If this + succeeds, the service should succeed.

-

NOTE: Prior to version 1.3.13, the configuration was + Prior to version 1.3.13, the configuration was not tested prior to performing the installation, and a lack of service dependencies often caused the console window to succeed, but the service would still fail. See below if you are having problems running a version of Apache prior to 1.3.13 to resolve the issue. If you have this problem with version 1.3.13 or - greater, first try uninstalling (-u) and re-installing (-i) the - Apache service.

-
+ greater, first try uninstalling (-u) and re-installing + (-i) the Apache service.

To start Apache as a service, you first need to install it as a service. Multiple Apache services can be installed, each @@ -50,103 +43,118 @@ You can later stop Apache by clicking on Stop. As an alternative to using the Services window, you can start and stop the "Apache" service from the command line with

-
-  NET START APACHE
-  NET STOP APACHE
-
+ + + NET START APACHE
+ NET STOP APACHE +

See Controlling Apache as a Service for more information on installing and controlling Apache services.

-

Apache, unlike many other Windows NT/2000 services, + Note + Apache, unlike many other Windows NT/2000 services, logs any errors to its own error.log file in the logs folder within the Apache server root folder. You will not find Apache error details in the Windows NT Event - Log.

+ Log.

After starting Apache as a service (or if you have trouble starting it) you can test it using the same procedure as for running in a console window. Remember to use the command:

-
-  apache -n "service name"
-
+ + + apache -n "service name" +

to assure you are using the service's configuration.

-

Running Apache for Windows - as a Service

+
-

Note: The -n option to specify a service name is - only available with Apache 1.3.7 and later. Earlier - versions of Apache only support the default service name - 'Apache'.

+
+ + Running Apache for Windows as a Service + + The -n option to specify a service + name is only available with Apache 1.3.7 and later. + Earlier versions of Apache only support the default service name + "Apache".

You can install Apache as a Windows NT service as follows:

-
-    apache -i -n "service name"
-
+ + + apache -i -n "service name" +

To install a service to use a particular configuration, specify the configuration file when the service is installed:

-
-    apache -i -n "service name" -f "\my server\conf\my.conf"
-
+ + + apache -i -n "service name" -f "\my server\conf\my.conf" +

To remove an Apache service, use:

-
-    apache -u -n "service name"
-
+ + + apache -u -n "service name" +

The default "service name", if one is not specified, is "Apache".

-

Once a service is installed, you can use the -n +

Once a service is installed, you can use the -n option, in conjunction with other options, to refer to a service's configuration file. For example:

To test a service's configuration file:

-
-    apache -n "service name" -t
-
+ + + apache -n "service name" -t +

To start a console Apache using a service's configuration file:

-
-    apache -n "service name"
-
-

Important Note on service - dependencies:

+ + apache -n "service name" + + +
+ +
+ + Important Note on service dependencies:

Prior to Apache release 1.3.13, the dependencies required to successfully start an installed service were not configured. After installing a service using earlier versions of Apache, you must follow these steps:

-
-    Run regedt32
-    Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
-    Double-click to open the SYSTEM, then the CurrentControlSet keys
-    Scroll down and click on the Apache servicename
-    Select Edit - Add Value... from the menu
-    Fill in the Add Value dialog with 
-        Value Name: DependOnGroup 
-        Data Type: REG_MULTI_SZ
-        and click OK
-    Leave the Multi-String Editor dialog empty and click OK
-    Select Edit - Add Value... from the menu
-    Fill in the Add Value dialog with 
-        Value Name: DependOnService
-        Data Type: REG_MULTI_SZ
-        and click OK
-    Type the following list (one per line) in the Multi-String Editor dialog
-        Tcpip
-        Afd
-        and click OK
-
+ + + Run regedt32
+ Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
+ Double-click to open the SYSTEM, then the CurrentControlSet keys
+ Scroll down and click on the Apache servicename
+ Select Edit - Add Value... from the menu
+ Fill in the Add Value dialog with
+     Value Name: DependOnGroup
+     Data Type: REG_MULTI_SZ
+     and click OK
+ Leave the Multi-String Editor dialog empty and click OK
+ Select Edit - Add Value... from the menu
+ Fill in the Add Value dialog with
+     Value Name: DependOnService
+     Data Type: REG_MULTI_SZ
+     and click OK
+ Type the following list (one per line) in the Multi-String Editor dialog
+     Tcpip
+     Afd
+     and click OK
+

If you are using COM or DCOM components from a third party module, ISAPI, or other add-in scripting technologies such as @@ -157,36 +165,36 @@ DependOnService value, double click that value if it already exists, and add the Rpcss entry to the list.

-

User Account for Apache Service to Run As (NT/2000)

+
+ +
+ + User Account for Apache Service to Run As (NT/2000)

When Apache is first installed as a service (e.g. with the - -i option) it will run as user "System" (the LocalSystem + -i option) it will run as user "System" (the LocalSystem account). There should be few issues if all resources for the web server reside on the local system, but it has broad security privileges to affect the local machine!

-
- LocalSystem is a very privileged account locally, so you - shouldn't run any shareware applications there. However, it - has no network privileges and cannot leave the machine via - any NT-secured mechanism, including file system, named pipes, - DCOM, or secure RPC. -
+ LocalSystem is a very privileged account locally, so you + shouldn't run any shareware applications there. However, it + has no network privileges and cannot leave the machine via + any NT-secured mechanism, including file system, named pipes, + DCOM, or secure RPC.

NEVER grant network privileges to the SYSTEM account! Create a new user account instead, grant the - appropriate privileges to that user, and use the the 'Log On - As:' option. Select the Start Menu -> Settings -> Control + appropriate privileges to that user, and use the the "Log On + As:" option. Select the Start Menu -> Settings -> Control Panel -> Services -> apache service ... and click the "Startup" button to access this setting.

-
- A service that runs in the context of the LocalSystem account - inherits the security context of the SCM. It is not - associated with any logged-on user account and does not have - credentials (domain name, user name, and password) to be used - for verification. -
+ A service that runs in the context of the LocalSystem account + inherits the security context of the SCM. It is not + associated with any logged-on user account and does not have + credentials (domain name, user name, and password) to be used + for verification.

The SYSTEM account has no privileges to the network, so shared pages or a shared installation of Apache is invisible to @@ -211,7 +219,7 @@

  • In the drop-down list, verify that the following rights - have been granted to the selected account: + have been granted to the selected account:
    • Act as part of the operating system
    • @@ -227,12 +235,12 @@
    • Confirm that the selected account is a member of the Users group.
    • -
    • Confirm the selected account has access to all document - and script directories (minimally read and browse - access).
    • +
    • Confirm the selected account has access to all + document and script + directories (minimally read and browse access).
    • Confirm the selected account has read/write/delete access - to the Apache logs directory!
    • + to the Apache logs directory!

    If you allow the account to log in as a user, then you can @@ -242,21 +250,25 @@ followed the steps above, Apache should execute as a service with no problems.

    -

    Note: error code 2186 is a good indication - that you need to review the 'Log On As' configuration, since - the server can't access a required network resource.

    + Error code 2186 is a good indication + that you need to review the "Log On As" configuration, since + the server can't access a required network resource. + +
  • -

    Troubleshooting Apache for - Windows as a Service

    +
    + + Troubleshooting Apache for Windows as a Service

    When starting Apache as a service you may encounter an error message from Windows service manager. For example if you try to start Apache using the Services applet in Windows Control Panel - you may get the following message;

    -
    -  Could not start the apache service on \\COMPUTER
    -  Error 1067; The process terminated unexpectedly.
    -
    + you may get the following message:

    + + + Could not start the apache service on \\COMPUTER
    + Error 1067; The process terminated unexpectedly. +

    You will get this error if there is any problem starting Apache. In order to see what is causing the problem you should @@ -266,60 +278,72 @@

    Also, Apache 1.3.13 now records startup errors in the Application Event Log under Windows NT/2000, if Apache is run - as a service. Run the Event Viewer and select Log ... - Application to see these events.

    + as a service. Run the Event Viewer and select Log ... + Application to see these events.

    -

    Check the Application Event Log with the Event + Check the Application Event Log with the Event Viewer in case of any problems, even if no error message pops - up to warn you that an error occured.

    + up to warn you that an error occured. + +
    + +
    + + Running Apache for Windows from the Command Line -

    Running Apache for Windows - from the Command Line

    - For details on controlling Apache service from the command +

    For details on controlling Apache service from the command line, please refer to console - command line section. + command line section.

    -

    Controlling Apache as a - Service

    +
    + +
    + + Controlling Apache as a Service

    Multiple instances of Apache can be installed and run as services. Signal an installed Apache service to start, restart, or shutdown/stop as follows:

    -
    -    apache -n "service name" -k start
    -    apache -n "service name" -k restart
    -    apache -n "service name" -k shutdown
    -    apache -n "service name" -k stop
    -
    - -

    For the default "Apache" service, the -n Apache option is - still required, since the -k commands without the -n option are - directed at Apache running in a console window. The quotes are - only required if the service name contains spaces.

    - -

    Note: the -k stop alias for the -k shutdown command - was introduced in Apache version 1.3.13. Earlier - versions of Apache will only recognize the -k shutdown option. - Prior to 1.3.3, Apache did not recognize any -k - options at all!

    - -

    In addition, you can use the native NT NET command to start - and stop Apache services as follows:

    -
    -    NET START "service name"
    -    NET STOP "service name"
    -
    + + + apache -n "service name" -k start
    + apache -n "service name" -k restart
    + apache -n "service name" -k shutdown
    + apache -n "service name" -k stop +
    + +

    For the default "Apache" service, the -n Apache + option is still required, since the -k commands without + the -n option are directed at Apache running in a console + window. The quotes are only required if the service name contains spaces.

    + + Note the -k stop alias for the + -k shutdown command was introduced in Apache version + 1.3.13. Earlier versions of Apache will only recognize the + -k shutdown option. Prior to 1.3.3, Apache did not + recognize any -k options at all! + +

    In addition, you can use the native NT NET command + to start and stop Apache services as follows:

    + + + NET START "service name"
    + NET STOP "service name" +

    Again, quotes are only required if the service name contains spaces.

    -

    HIGHLY EXPERIMENTAL - Windows 95/98 Service

    +
    + +
    -

    Note: The service options for Windows 95 and 98 are + HIGHLY EXPERIMENTAL Windows 95/98 Service + + The service options for Windows 95 and 98 are only available with Apache 1.3.13 and later. Earlier versions of Apache only supported Apache in a console window - for Windows 95/98.

    + for Windows 95/98.

    There is some support for Apache on Windows 95/98 to behave in a similar manner as a service on Windows NT/2000. It is @@ -337,23 +361,24 @@

    Apache will attempt to start and if successful it will run in the background. If you run the command

    -
    -   Apache -n "service name" -k start
    -
    + + + Apache -n "service name" -k start +

    via a shortcut on your desktop, for example, then if the service starts successfully a console window will flash up but immediately disappears. If Apache detects any errors on startup - such as a incorrect entries in the httpd.conf file, then the - console window will remain visible. This will display an error - message which will be useful in tracking down the cause of the - problem.

    + such as a incorrect entries in the httpd.conf file, + then the console window will remain visible. This will display + an error message which will be useful in tracking down the cause + of the problem.

    -

    Windows 95/98 does not support NET START or NET STOP - commands so you must use Apache's Service Control options at a - command prompt. You may wish to set up a shortcut for each of - these commands so that you can just choose it from the start - menu or desktop to perform the required action.

    +

    Windows 95/98 does not support NET START or + NET STOP commands so you must use Apache's Service + Control options at a command prompt. You may wish to set up a + shortcut for each of these commands so that you can just choose + it from the start menu or desktop to perform the required action.

    Apache and Windows 95/98 offer no support for running the Apache service as a specific user with network privileges. In @@ -363,7 +388,8 @@ httpd server. These facilities exist only to assist the user in developing web content and learning the Apache server, and perhaps as a intranet server on a secured, private network.

    - - - + +
    + +
    diff --git a/docs/manual/platform/windows.html.en b/docs/manual/platform/windows.html.en new file mode 100644 index 00000000000..f1efe539a88 --- /dev/null +++ b/docs/manual/platform/windows.html.en @@ -0,0 +1,569 @@ + + +Using Apache with Microsoft Windows - Apache HTTP Server
    <-

    Using Apache with Microsoft Windows

    + +

    This document explains how to install, configure and run + Apache 2.0 under Microsoft Windows. If you find any bugs, or + wish to contribute in other ways, please use our bug reporting page.

    + +

    Most of this document assumes that you are installing + Windows from a binary distribution. If you want to compile + Apache yourself (possibly to help with development, or to track + down bugs), see Compiling Apache + for Microsoft Windows.

    + +

    At this time, support for Windows 95, 98 and ME is + incomplete. Apache 2.0 is not expected to work on those + platforms at this time. If you are interested in + helping with that effort, please see the developer's site for + information on how to get + involved. Support will likely be provided at some point in + the future, and patches to allow Apache to work on 95, 98 and + ME are welcome!

    + +
    top

    Requirements

    + + + +

    Apache 2.0 is designed to run on Windows NT 4.0 and Windows + 2000. The binary installer will only work with the x86 family + of processors, such as Intel's. Apache may also run on Windows + 95, 98 and ME, but these are not tested, and are never + recommended for production servers. In all cases TCP/IP + networking must be installed.

    + +

    If running on Windows 95, the "Winsock2" upgrade MUST BE + INSTALLED. "Winsock2" for Windows 95 is available here.

    + +

    If running on NT 4.0, installing Service Pack 3 or 6 is + recommended, as Service Pack 4 created known issues with TCP/IP + and WinSock integrity that were resolved in later Service + Packs.

    + +
    top

    Downloading Apache for Windows

    + + + +

    Information on the latest version of Apache can be found on + the Apache web server at http://httpd.apache.org/. + This will list the current release, any more recent alpha or + beta-test releases, together with details of mirror web and + anonymous ftp sites.

    + +

    You should download the version of Apache for Windows with + the .msi extension. This is a single Microsoft + Installer file containing Apache, ready to install and run. + There is a seperate .zip file containing only + the source code, to compile Apache yourself with the Microsoft + Visual C++ (Visual Studio) tools.

    + +
    top

    Installing Apache for Windows

    + + + +

    Run the Apache .msi file you downloaded above. + This will ask for:

    + +
      +
    • the directory to install Apache into (the default is + \Program Files\Apache Group\Apache although you + can change this to any other directory)
    • + +
    • the start menu name (default is "Apache Web Server")
    • + +
    • the installation type. The "Typical" option installs + everything except the source code. The "Minimum" option does + not install the manuals or source code. Choose the "Custom" + install if you want to install the source code.
    • +
    + +

    During the installation, Apache will configure the files in + the conf directory for your chosen installation + directory. However if any of the files in this directory + already exist they will not be overwritten. + Instead the new copy of the corresponding file will be left + with the extension .default. So, for example, if + conf\httpd.conf already exists it will not be + altered, but the version which would have been installed will + be left in conf\httpd.conf.default. After the + installation has finished you should manually check to see what is + in new in the .default file, and if necessary + update your existing configuration files.

    + +

    Also, if you already have a file called + htdocs\index.html then it will not be overwritten + (no index.html.default file will be installed + either). This should mean it a safe to install Apache over an + existing installation (but you will have to stop the existing + server running before doing the installation, then start the + new one after the installation is finished).

    + +

    After installing Apache, you should edit the configuration + files in the conf directory as required. These + files will be configured during the install ready for Apache to + be run from the directory where it was installed, with the + documents served from the subdirectory htdocs. + There are lots of other options which should be set before you + start really using Apache. However to get started quickly the + files should work as installed.

    + +
    top

    Running Apache for Windows

    + + + +

    There are two ways you can run Apache:

    + +
      +
    • As a "service" + (available on Windows NT/2000, or a pseudo-service on Windows + 95, 98 or ME). This is the best option if you want Apache to + automatically start when you machine boots, and to keep + Apache running when you log-off.

    • + +
    • From a console window. This MUST + be used by any administrator to test before to attempting to + run as a service.

    • +
    + +

    To run Apache from a console window, select the "Start + Apache as console app" option from the Start menu (in Apache + 1.3.4 and earlier, this option was called "Apache Server"). + This will open a console window and start Apache running inside + it. The window will remain active until you stop Apache. To + stop Apache running, either select the "Shutdown Apache console + app" icon option from the Start menu (this is not available in + Apache 1.3.4 or earlier), or see Signalling + Console Apache when Running for how to control Apache from + the command line.

    + +

    If the Apache console window closes immediately (or + unexpectedly), run the "Command Prompt" from the Start Menu - + Programs list. Change to the folder to which you installed + Apache, type the command apache, and read the error message. + Then change to the logs folder, and review the + error.log file for configuration mistakes. + If you accepted the defaults when you installed Apache, + the commands would be:

    + +

    + c:
    + cd "\program files\apache group\apache"
    + apache
    + Wait for Apache to exit, or press Ctrl+C
    + cd logs
    + more <error.log +

    + +

    Complete the steps above before you proceed + to attempt to start Apache as a Window NT/2000 + service!

    + +

    To start Apache as a service, you first need to install it + as a service. Multiple Apache services can be installed, each + with a different name and configuration. To install the default + Apache service named "Apache", run the "Install Apache as + Service (NT only)" option from the Start menu. Once this is + done you can start the "Apache" service by opening the Services + window (in the Control Panel), selecting Apache, then clicking + on Start. Apache will now be running in the background. You can + later stop Apache by clicking on Stop. As an alternative to + using the Services window, you can start and stop the "Apache" + service from the control line with:

    + +

    + NET START APACHE
    + NET STOP APACHE +

    + +

    See Signalling Service Apache when + Running for more information on installing and controlling + Apache services.

    + +
    Apache, unlike many other Windows NT/2000 services, + logs any errors to its own error.log file in the + logs folder within the Apache server root folder. + You will not find Apache error details in the Windows + NT Event Log.
    + +

    After starting Apache running (either in a console window or + as a service) it will be listening to port 80 (unless you + changed the Listen directive in the configuration + files). To connect to the server and access the default page, + launch a browser and enter this URL:

    + +

    + http://localhost/ +

    + +

    This should respond with a welcome page, and a link to the + Apache manual. If nothing happens or you get an error, look in + the error_log file in the logs + directory. If your host isn't connected to the net, you may + have to use this URL:

    + +

    + http://127.0.0.1/ +

    + +

    Once your basic installation is working, you should + configure it properly by editing the files in the + conf directory. Again, if you change the + configuration of the Windows NT/2000 service for Apache, first + attempt to start it from the command line to assure that the + service starts with no errors.

    + +

    Because Apache CANNOT share the same port with + another TCPIP application, you may need to stop or uninstall + certain services first. These include (but are not limited to) + other web servers, and firewall products such as BlackIce. If + you can only start Apache with these services disabled, + reconfigure either Apache or the other product so that they do + not listen on the same TCPIP ports.

    + +
    top

    Configuring Apache for Windows

    + + + +

    Apache is configured by files in the conf + directory. These are the same as files used to configure the + Unix version, but there are a few different directives for + Apache on Windows. See the Apache + documentation for all the available directives.

    + +

    The main differences in Apache for Windows are:

    + +
      +
    • +

      Because Apache for Windows is multithreaded, it does not + use a separate process for each request, as Apache does + with Unix. Instead there are usually only two Apache + processes running: a parent process, and a child which + handles the requests. Within the child each request is + handled by a separate thread.

      + +

      So the "process"-management directives are + different:

      + +

      MaxRequestsPerChild + - Like the Unix directive, this controls how many requests + a process will serve before exiting. However, unlike Unix, + a process serves all the requests at once, not just one, so + if this is set, it is recommended that a very high number + is used. The recommended default, MaxRequestsPerChild + 0, does not cause the process to ever exit.

      + +
      Warning: The server configuration + file is reread when the new child process is started. If you + have modified httpd.conf, the new child may not + start or you may receive unexpected results.
      + +

      ThreadsPerChild + - This directive is new, and tells the server how many + threads it should use. This is the maximum number of + connections the server can handle at once; be sure and set + this number high enough for your site if you get a lot of + hits. The recommended default is ThreadsPerChild + 50.

      +
    • + +
    • +

      The directives that accept filenames as arguments now + must use Windows filenames instead of Unix ones. However, + because Apache uses Unix-style names internally, you must + use forward slashes, not backslashes. Drive letters can be + used; if omitted, the drive with the Apache executable will + be assumed.

      +
    • + +
    • +

      Apache for Windows contains the ability to load modules + at runtime, without recompiling the server. If Apache is + compiled normally, it will install a number of optional + modules in the \Apache\modules directory. To + activate these, or other modules, the new LoadModule + directive must be used. For example, to active the status + module, use the following (in addition to the + status-activating directives in + access.conf):

      + +

      + LoadModule status_module modules/mod_status.so +

      + +

      Information on creating loadable + modules is also available.

      +
    • + +
    • +

      Apache can also load ISAPI Extensions (i.e., + Internet Server Applications), such as those used by + Microsoft's IIS, and other Windows servers. More information is + available. Note that Apache CANNOT load ISAPI + Filters.

      +
    • + +
    • +

      When running CGI scripts, the method Apache uses to find + the interpreter for the script is configurable using the + ScriptInterpreterSource + directive.

      +
    • + +
    • +

      Since it is often difficult to manage files with names + like .htaccess under windows, you may find it + useful to change the name of this configuration file using + the AccessFilename + directive.

      +
    • +
    + +
    top

    Running Apache for Windows as a Service

    + + + +
    The -n option to specify a service name + is only available with Apache 1.3.7 and later. Earlier versions of + Apache only support the default service name + "Apache".
    + +

    You can install Apache as a Windows NT service as + follows:

    + +

    + apache -k install -n "service name" +

    + +

    To install a service to use a particular configuration, + specify the configuration file when the service is + installed:

    + +

    + apache -k install -n "service name" -f "\my server\conf\my.conf" +

    + +

    To remove an Apache service, use

    + +

    + apache -k uninstall -n "service name" +

    + +

    The default "service name", if one is not specified, is + "Apache".

    + +

    Once a service is installed, you can use the -n + option, in conjunction with other options, to refer to a + service's configuration file. For example:

    + +

    To test a service's configuration file:

    + +

    + apache -n "service name" -t +

    + +

    To start a console Apache using a service's configuration + file:

    + +

    + apache -n "service name" +

    + +

    Important Note on service dependencies:

    + +

    Prior to Apache release 1.3.13, the dependencies required to + successfully start an installed service were not configured. + After installing a service using earlier versions of Apache, + you must follow these steps:

    + +

    + Run regedt32
    + Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
    + Double-click to open the SYSTEM, then the CurrentControlSet keys
    + Scroll down and click on the Apache servicename
    + Select Edit - Add Value... from the menu
    + Fill in the Add Value dialog with
    +     Value Name: DependOnGroup
    +     Data Type: REG_MULTI_SZ
    +     and click OK
    + Leave the Multi-String Editor dialog empty and click OK
    + Select Edit - Add Value... from the menu
    + Fill in the Add Value dialog with
    +     Value Name: DependOnService
    +     Data Type: REG_MULTI_SZ
    +     and click OK
    + Type the following list (one per line) in the Multi-String Editor dialog
    +     Tcpip
    +     Afd
    +     and click OK +

    + +

    If you are using COM or DCOM components from a third party + module, ISAPI, or other add-in scripting technologies such as + ActiveState Perl, you may also need to add the entry Rpcss to + the DependOnService list. To avoid exposing the TCP port 135 + when it is unnecessary, Apache does not create that entry upon + installation. Follow the directions above to find or create the + DependOnService value, double click that value if it already + exists, and add the Rpcss entry to the list.

    + +
    top

    Running Apache for Windows from the Command Line

    + + + +

    The Start menu icons and the NT Service manager can provide + a simple interface for administering Apache. But in some cases + it is easier to work from the command line.

    + +

    When working with Apache it is important to know how it will + find the configuration files. You can specify a configuration + file on the command line in two ways:

    + +
      +
    • -f specifies a path to a particular + configuration file
    • +
    + +

    + apache -f "c:\my server\conf\my.conf"
    + apache -f test\test.conf +

    + +
      +
    • -n specifies the configuration file of + an installed Apache service (Apache 1.3.7 and later)
    • +
    + +

    + apache -n "service name" +

    + +

    In these cases, the proper ServerRoot should be set in the configuration file.

    + +

    If you don't specify a configuration file name with -f or + -n, Apache will use the file name compiled into the server, + usually "conf/httpd.conf". Invoking Apache with the + -V switch will display this value labeled as + SERVER_CONFIG_FILE. Apache + will then determine its ServerRoot by trying the following, in + this order:

    + +
      +
    • A ServerRoot directive via a + -C switch.
    • + +
    • The -d switch on the command line.
    • + +
    • Current working directory
    • + +
    • A registry entry, created if you did a binary + install.
    • + +
    • The server root compiled into the server.
    • +
    + +

    The server root compiled into the server is usually + "/apache". invoking apache with the -V switch + will display this value labeled as HTTPD_ROOT.

    + +

    When invoked from the start menu, Apache is usually passed + no arguments, so using the registry entry is the preferred + technique for console Apache.

    + +

    During a binary installation, a version-specific registry + key is created in the Windows registry:

    + +

    + HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.7
    +
    + HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\2.0a3 +

    + +

    This key is compiled into the server and can enable you to + test new versions without affecting the current version. Of + course you must take care not to install the new version on top + of the old version in the file system.

    + +

    If you did not do a binary install then Apache will in some + scenarios complain that about the missing registry key. This + warning can be ignored if it otherwise was able to find its + configuration files.

    + +

    The value of this key is the ServerRoot directory, containing the conf + directory. When Apache starts it will read the httpd.conf + file from this directory. If this file contains a + ServerRoot directive which + is different from the directory obtained from the registry key above, + Apache will forget the registry key and use the directory from the + configuration file. If you copy the Apache directory or configuration + files to a new location it is vital that you update the + ServerRoot directory + in the httpd.conf file to the new location.

    + +

    To run Apache from the command line as a console + application, use the following command:

    + +

    + apache +

    + +

    Apache will execute, and will remain running until it is + stopped by pressing control-C.

    + +
    top

    Signalling Service Apache when running

    + + + +

    On Windows NT, multiple instances of Apache can be run as + services. Signal an Apache service to start, restart, or + shutdown as follows:

    + +

    + apache -n "service name" -k start
    + apache -n "service name" -k restart
    + apache -n "service name" -k shutdown +

    + +

    In addition, you can use the native NT NET command + to start and stop Apache services as follows:

    + +

    + NET START "service name"
    + NET STOP "service name" +

    + +
    top

    Signalling Console Apache when running

    + + + +

    On Windows 95, Apache runs as a console application. You can + tell a running Apache to stop by opening another console window + and typing:

    + +

    + apache -k shutdown +

    + +

    This should be used instead of pressing Control-C in the + running Apache console window, because it lets Apache end any + current transactions and cleanup gracefully.

    + +

    You can also tell Apache to restart. This makes it re-read + the configuration files. Any transactions in progress are + allowed to complete without interruption. To restart Apache, + run

    + +

    + apache -k restart +

    + +
    Note for people familiar with the Unix version of Apache: + these commands provide a Windows equivalent to kill -TERM + pid and kill -USR1 pid. + The command line option used, -k, was chosen as a + reminder of the "kill" command used on Unix.
    + +
    \ No newline at end of file diff --git a/docs/manual/platform/windows.html b/docs/manual/platform/windows.xml similarity index 60% rename from docs/manual/platform/windows.html rename to docs/manual/platform/windows.xml index c0cd2b1e010..8704f937860 100644 --- a/docs/manual/platform/windows.html +++ b/docs/manual/platform/windows.xml @@ -1,19 +1,13 @@ - + + + - - - + + - Using Apache with Microsoft Windows - - + Using Apache with Microsoft Windows - - - -

    Using Apache with Microsoft Windows

    +

    This document explains how to install, configure and run Apache 2.0 under Microsoft Windows. If you find any bugs, or @@ -34,35 +28,12 @@ involved. Support will likely be provided at some point in the future, and patches to allow Apache to work on 95, 98 and ME are welcome!

    -
    - -
    -
  • Running Apache for Windows as - a Service
  • +
    -
  • Controlling Apache as a - Service
  • - -
  • Compiling Apache for - Microsoft Windows
  • - -
    - -

    Requirements

    + Requirements

    Apache 2.0 is designed to run on Windows NT 4.0 and Windows 2000. The binary installer will only work with the x86 family @@ -80,8 +51,11 @@ and WinSock integrity that were resolved in later Service Packs.

    -

    Downloading Apache for - Windows

    +
    + +
    + + Downloading Apache for Windows

    Information on the latest version of Apache can be found on the Apache web server at You should download the version of Apache for Windows with the .msi extension. This is a single Microsoft Installer file containing Apache, ready to install and run. - There is a seperate .zip file containing _only_ + There is a seperate .zip file containing only the source code, to compile Apache yourself with the Microsoft Visual C++ (Visual Studio) tools.

    -

    Installing Apache for - Windows

    +
    + +
    + + Installing Apache for Windows -

    Run the Apache .msi file you downloaded above. +

    Run the Apache .msi file you downloaded above. This will ask for:

      @@ -117,48 +94,53 @@

    During the installation, Apache will configure the files in - the conf directory for your chosen installation + the conf directory for your chosen installation directory. However if any of the files in this directory - already exist they will not be overwritten. + already exist they will not be overwritten. Instead the new copy of the corresponding file will be left - with the extension .default. So, for example, if - conf\httpd.conf already exists it will not be + with the extension .default. So, for example, if + conf\httpd.conf already exists it will not be altered, but the version which would have been installed will - be left in conf\httpd.conf.default. After the + be left in conf\httpd.conf.default. After the installation has finished you should manually check to see what is - in new in the .default file, and if necessary + in new in the .default file, and if necessary update your existing configuration files.

    Also, if you already have a file called - htdocs\index.html then it will not be overwritten - (no index.html.default file will be installed + htdocs\index.html then it will not be overwritten + (no index.html.default file will be installed either). This should mean it a safe to install Apache over an existing installation (but you will have to stop the existing server running before doing the installation, then start the new one after the installation is finished).

    After installing Apache, you should edit the configuration - files in the conf directory as required. These + files in the conf directory as required. These files will be configured during the install ready for Apache to be run from the directory where it was installed, with the - documents served from the subdirectory htdocs. + documents served from the subdirectory htdocs. There are lots of other options which should be set before you start really using Apache. However to get started quickly the files should work as installed.

    -

    Running Apache for Windows

    - There are two ways you can run Apache: +
    + +
    + + Running Apache for Windows + +

    There are two ways you can run Apache:

      -
    • As a "service" +
    • As a "service" (available on Windows NT/2000, or a pseudo-service on Windows 95, 98 or ME). This is the best option if you want Apache to automatically start when you machine boots, and to keep - Apache running when you log-off.

    • + Apache running when you log-off.

      -
    • From a console window. This MUST +
    • From a console window. This MUST be used by any administrator to test before to attempting to - run as a service.

    • + run as a service.

    To run Apache from a console window, select the "Start @@ -176,20 +158,22 @@ unexpectedly), run the "Command Prompt" from the Start Menu - Programs list. Change to the folder to which you installed Apache, type the command apache, and read the error message. - Then change to the logs folder, and review the error.log file - for configuration mistakes. If you accepted the defaults when - you installed Apache, the commands would be:

    -
    -  c:
    -  cd "\program files\apache group\apache"
    -  apache
    -  Wait for Apache to exit, or press Ctrl+C
    -  cd logs
    -  more <error.log
    -
    - -

    Complete the steps above before you proceed to - attempt to start Apache as a Window NT/2000 + Then change to the logs folder, and review the + error.log file for configuration mistakes. + If you accepted the defaults when you installed Apache, + the commands would be:

    + + + c:
    + cd "\program files\apache group\apache"
    + apache
    + Wait for Apache to exit, or press Ctrl+C
    + cd logs
    + more <error.log +
    + +

    Complete the steps above before you proceed + to attempt to start Apache as a Window NT/2000 service!

    To start Apache as a service, you first need to install it @@ -203,42 +187,45 @@ later stop Apache by clicking on Stop. As an alternative to using the Services window, you can start and stop the "Apache" service from the control line with:

    -
    -  NET START APACHE
    -  NET STOP APACHE
    -
    + + + NET START APACHE
    + NET STOP APACHE +

    See Signalling Service Apache when Running for more information on installing and controlling Apache services.

    -

    Apache, unlike many other Windows NT/2000 services, - logs any errors to its own error.log file in the logs folder - within the Apache server root folder. You will not - find Apache error details in the Windows NT Event - Log.

    + Apache, unlike many other Windows NT/2000 services, + logs any errors to its own error.log file in the + logs folder within the Apache server root folder. + You will not find Apache error details in the Windows + NT Event Log.

    After starting Apache running (either in a console window or as a service) it will be listening to port 80 (unless you - changed the Listen directive in the configuration + changed the Listen directive in the configuration files). To connect to the server and access the default page, launch a browser and enter this URL:

    -
    -  http://localhost/
    -
    + + + http://localhost/ +

    This should respond with a welcome page, and a link to the Apache manual. If nothing happens or you get an error, look in - the error_log file in the logs + the error_log file in the logs directory. If your host isn't connected to the net, you may have to use this URL:

    -
    -  http://127.0.0.1/
    -
    + + + http://127.0.0.1/ +

    Once your basic installation is working, you should configure it properly by editing the files in the - conf directory. Again, if you change the + conf directory. Again, if you change the configuration of the Windows NT/2000 service for Apache, first attempt to start it from the command line to assure that the service starts with no errors.

    @@ -251,10 +238,13 @@ reconfigure either Apache or the other product so that they do not listen on the same TCPIP ports.

    -

    Configuring Apache for - Windows

    +
    + +
    -

    Apache is configured by files in the conf + Configuring Apache for Windows + +

    Apache is configured by files in the conf directory. These are the same as files used to configure the Unix version, but there are a few different directives for Apache on Windows. See the Apache @@ -274,21 +264,20 @@

    So the "process"-management directives are different:

    -

    MaxRequestsPerChild +

    MaxRequestsPerChild - Like the Unix directive, this controls how many requests a process will serve before exiting. However, unlike Unix, a process serves all the requests at once, not just one, so if this is set, it is recommended that a very high number is used. The recommended default, MaxRequestsPerChild - 0, does not cause the process to ever exit. - Warning: The server configuration file is reread - when the new child process is started. If you have modified - httpd.conf, the new child may not start or you may receive - unexpected results.

    - -

    ThreadsPerChild + 0, does not cause the process to ever exit.

    + + Warning: The server configuration + file is reread when the new child process is started. If you + have modified httpd.conf, the new child may not + start or you may receive unexpected results. + +

    ThreadsPerChild - This directive is new, and tells the server how many threads it should use. This is the maximum number of connections the server can handle at once; be sure and set @@ -311,15 +300,16 @@ at runtime, without recompiling the server. If Apache is compiled normally, it will install a number of optional modules in the \Apache\modules directory. To - activate these, or other modules, the new LoadModule + activate these, or other modules, the new LoadModule directive must be used. For example, to active the status module, use the following (in addition to the status-activating directives in access.conf):

    -
    -    LoadModule status_module modules/mod_status.so
    -
    + + + LoadModule status_module modules/mod_status.so +

    Information on creating loadable @@ -335,62 +325,73 @@ Filters.

    -
  • When running CGI scripts, the method Apache uses to find - the interpreter for the script is configurable using the ScriptInterpreterSource - directive.
  • - -
  • Since it is often difficult to manage files with names - like .htaccess under windows, you may find it - useful to change the name of this configuration file using - the AccessFilename - directive.
  • +
  • +

    When running CGI scripts, the method Apache uses to find + the interpreter for the script is configurable using the + ScriptInterpreterSource + directive.

    +
  • + +
  • +

    Since it is often difficult to manage files with names + like .htaccess under windows, you may find it + useful to change the name of this configuration file using + the AccessFilename + directive.

    +
  • -

    Running Apache for Windows - as a Service

    +
    -

    Note: The -n option to specify a service name is - only available with Apache 1.3.7 and later. Earlier versions of +

    + + Running Apache for Windows as a Service + + The -n option to specify a service name + is only available with Apache 1.3.7 and later. Earlier versions of Apache only support the default service name - 'Apache'.

    + "Apache".

    You can install Apache as a Windows NT service as follows:

    -
    -    apache -k install -n "service name"
    -
    + + + apache -k install -n "service name" +

    To install a service to use a particular configuration, specify the configuration file when the service is installed:

    -
    -    apache -k install -n "service name" -f "\my server\conf\my.conf"
    -
    + + + apache -k install -n "service name" -f "\my server\conf\my.conf" +

    To remove an Apache service, use

    -
    -    apache -k uninstall -n "service name"
    -
    + + + apache -k uninstall -n "service name" +

    The default "service name", if one is not specified, is "Apache".

    -

    Once a service is installed, you can use the -n +

    Once a service is installed, you can use the -n option, in conjunction with other options, to refer to a service's configuration file. For example:

    To test a service's configuration file:

    -
    -    apache -n "service name" -t
    -
    + + + apache -n "service name" -t +

    To start a console Apache using a service's configuration file:

    -
    -    apache -n "service name"
    -
    + + + apache -n "service name" +

    Important Note on service dependencies:

    @@ -398,27 +399,28 @@ successfully start an installed service were not configured. After installing a service using earlier versions of Apache, you must follow these steps:

    -
    -    Run regedt32
    -    Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
    -    Double-click to open the SYSTEM, then the CurrentControlSet keys
    -    Scroll down and click on the Apache servicename
    -    Select Edit - Add Value... from the menu
    -    Fill in the Add Value dialog with 
    -        Value Name: DependOnGroup 
    -        Data Type: REG_MULTI_SZ
    -        and click OK
    -    Leave the Multi-String Editor dialog empty and click OK
    -    Select Edit - Add Value... from the menu
    -    Fill in the Add Value dialog with 
    -        Value Name: DependOnService
    -        Data Type: REG_MULTI_SZ
    -        and click OK
    -    Type the following list (one per line) in the Multi-String Editor dialog
    -        Tcpip
    -        Afd
    -        and click OK
    -
    + + + Run regedt32
    + Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
    + Double-click to open the SYSTEM, then the CurrentControlSet keys
    + Scroll down and click on the Apache servicename
    + Select Edit - Add Value... from the menu
    + Fill in the Add Value dialog with
    +     Value Name: DependOnGroup
    +     Data Type: REG_MULTI_SZ
    +     and click OK
    + Leave the Multi-String Editor dialog empty and click OK
    + Select Edit - Add Value... from the menu
    + Fill in the Add Value dialog with
    +     Value Name: DependOnService
    +     Data Type: REG_MULTI_SZ
    +     and click OK
    + Type the following list (one per line) in the Multi-String Editor dialog
    +     Tcpip
    +     Afd
    +     and click OK +

    If you are using COM or DCOM components from a third party module, ISAPI, or other add-in scripting technologies such as @@ -429,8 +431,11 @@ DependOnService value, double click that value if it already exists, and add the Rpcss entry to the list.

    -

    Running Apache for Windows - from the Command Line

    +
    + +
    + + Running Apache for Windows from the Command Line

    The Start menu icons and the NT Service manager can provide a simple interface for administering Apache. But in some cases @@ -441,36 +446,41 @@ file on the command line in two ways:

      -
    • -f specifies a path to a particular configuration - file
    • +
    • -f specifies a path to a particular + configuration file
    -
    -    apache -f "c:\my server\conf\my.conf"
    -    apache -f test\test.conf
    -
    + + + apache -f "c:\my server\conf\my.conf"
    + apache -f test\test.conf +
      -
    • -n specifies the configuration file of an installed - Apache service (Apache 1.3.7 and later)
    • +
    • -n specifies the configuration file of + an installed Apache service (Apache 1.3.7 and later)
    -
    -    apache -n "service name"
    -
    - -

    In these cases, the proper ServerRoot should be set in the - configuration file.

    - -

    If you don't specify a configuration file name with -f or - -n, Apache will use the file name compiled into the server, - usually "conf/httpd.conf". Invoking Apache with the -V switch - will display this value labeled as SERVER_CONFIG_FILE. Apache - will then determine its ServerRoot by trying the following, in + + + apache -n "service name" + + +

    In these cases, the proper ServerRoot should be set in the configuration file.

    + +

    If you don't specify a configuration file name with -f or + -n, Apache will use the file name compiled into the server, + usually "conf/httpd.conf". Invoking Apache with the + -V switch will display this value labeled as + SERVER_CONFIG_FILE. Apache + will then determine its ServerRoot by trying the following, in this order:

      -
    • A ServerRoot directive via a -C switch.
    • +
    • A ServerRoot directive via a + -C switch.
    • -
    • The -d switch on the command line.
    • +
    • The -d switch on the command line.
    • Current working directory
    • @@ -481,8 +491,8 @@

    The server root compiled into the server is usually - "/apache". invoking apache with the -V switch will display this - value labeled as HTTPD_ROOT.

    + "/apache". invoking apache with the -V switch + will display this value labeled as HTTPD_ROOT.

    When invoked from the start menu, Apache is usually passed no arguments, so using the registry entry is the preferred @@ -490,11 +500,12 @@

    During a binary installation, a version-specific registry key is created in the Windows registry:

    -
    -  HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.7
     
    -  HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\2.0a3
    -
    + + HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.7
    +
    + HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\2.0a3 +

    This key is compiled into the server and can enable you to test new versions without affecting the current version. Of @@ -506,54 +517,65 @@ warning can be ignored if it otherwise was able to find its configuration files.

    -

    The value of this key is the "ServerRoot" directory, - containing the conf directory. When Apache starts - it will read the httpd.conf file from this - directory. If this file contains a ServerRoot - directive which is different from the directory obtained from - the registry key above, Apache will forget the registry key and - use the directory from the configuration file. If you copy the - Apache directory or configuration files to a new location it is - vital that you update the ServerRoot directory in - the httpd.conf file to the new location.

    +

    The value of this key is the ServerRoot directory, containing the conf + directory. When Apache starts it will read the httpd.conf + file from this directory. If this file contains a + ServerRoot directive which + is different from the directory obtained from the registry key above, + Apache will forget the registry key and use the directory from the + configuration file. If you copy the Apache directory or configuration + files to a new location it is vital that you update the + ServerRoot directory + in the httpd.conf file to the new location.

    To run Apache from the command line as a console application, use the following command:

    -
    -    apache 
    -
    + + + apache +

    Apache will execute, and will remain running until it is stopped by pressing control-C.

    -

    Signalling Service - Apache when running

    +
    + +
    + + Signalling Service Apache when running

    On Windows NT, multiple instances of Apache can be run as services. Signal an Apache service to start, restart, or shutdown as follows:

    -
    -    apache -n "service name" -k start
    -    apache -n "service name" -k restart
    -    apache -n "service name" -k shutdown
    -
    - -

    In addition, you can use the native NT NET command to start - and stop Apache services as follows:

    -
    -    NET START "service name"
    -    NET STOP "service name"
    -
    - -

    Signalling Console Apache when - running

    + + + apache -n "service name" -k start
    + apache -n "service name" -k restart
    + apache -n "service name" -k shutdown +
    + +

    In addition, you can use the native NT NET command + to start and stop Apache services as follows:

    + + + NET START "service name"
    + NET STOP "service name" +
    + +
    + +
    + + Signalling Console Apache when running

    On Windows 95, Apache runs as a console application. You can tell a running Apache to stop by opening another console window and typing:

    -
    -    apache -k shutdown
    -
    + + + apache -k shutdown +

    This should be used instead of pressing Control-C in the running Apache console window, because it lets Apache end any @@ -563,16 +585,19 @@ the configuration files. Any transactions in progress are allowed to complete without interruption. To restart Apache, run

    -
    -    apache -k restart
    -
    -

    Note for people familiar with the Unix version of Apache: + + apache -k restart + + + Note for people familiar with the Unix version of Apache: these commands provide a Windows equivalent to kill -TERM pid and kill -USR1 pid. The command line option used, -k, was chosen as a - reminder of the "kill" command used on Unix.

    - - - + reminder of the "kill" command used on Unix. + +
    + +
    +