Text of httpd.apache.org › docs › trunk › platform › windows.html as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Using Apache HTTP Server on Microsoft Windows - Apache HTTP Server Version 2.5

Modules | Directives | FAQ | Glossary | Sitemap | Report a bug Apache HTTP Server Version 2.5 Apache > HTTP Server > Documentation > Version 2.5 > Platform Specific Notes Using Apache HTTP Server on Microsoft Windows Available Languages: en | fr | ko This document explains how to install, configure and run Apache HTTP Server 2.5 under Microsoft Windows. If you have questions after reviewing the documentation (and any event and error logs), you should consult the peer-supported users' mailing list .

This document assumes that you are installing a binary distribution of httpd. If you want to compile Apache httpd yourself (possibly to help with development or tracking down bugs), see Compiling httpd for Microsoft Windows . Operating System Requirements Downloading httpd for Windows Customizing httpd for Windows Running httpd as a Service Running httpd as a Console Application Testing the Installation Configuring Access to Network Resources Windows Tuning Operating System Requirements ¶ The primary Windows platform for running Apache httpd 2.5 is Windows 2000 or later.

Always obtain and install the current service pack to avoid operating system bugs. Apache HTTP Server versions later than 2.2 will not run on any operating system earlier than Windows 2000. Downloading httpd for Windows ¶ The Apache HTTP Server Project itself does not provide binary releases of software, only source code. Individual committers may provide binary packages as a convenience, but it is not a release deliverable.

If you cannot compile the Apache HTTP Server yourself, you can obtain a binary package from numerous binary distributions available on the Internet. Popular options for deploying Apache httpd, and, optionally, PHP and MySQL, on Microsoft Windows, include: Apache Lounge WampServer Customizing httpd for Windows ¶ Apache httpd is configured by the files in the conf subdirectory. These are the same files used to configure the Unix version, but there are a few different directives for httpd on Windows.

See the directive index for all the available directives. The default configuration of the source distribution expects the server to be installed into \Apache2x. This can be customized at compilation time, but it's important that ultimately the ServerRoot in httpd.conf match the actual installation root. Binary distributions may customize either the default installation root or the overall layout of the initial configuration.

The main differences in httpd for Windows are: Because httpd for Windows is multithreaded, it does not use a separate process for each request, as httpd can on Unix. Instead there are usually only two httpd processes running: a parent process, and a child which handles the requests. Within the child process each request is handled by a separate thread. The process management directives are also different: MaxConnectionsPerChild : Like the Unix directive, this controls how many connections a single child process will serve before exiting.

However, unlike on Unix, a replacement process is not instantly available. Use the default MaxConnectionsPerChild 0 , unless instructed to change the behavior to overcome a memory leak in third party modules or in-process applications. Warning: The server configuration file is reread when a 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. It tells the server how many threads it should use. This is the maximum number of connections the server can handle at once, so be sure to set this number high enough for your site if you get a lot of hits. The recommended default is ThreadsPerChild 150 , but this must be adjusted to reflect the greatest anticipated number of simultaneous connections to accept. The directives that accept filenames as arguments must use Windows filenames instead of Unix ones.

However, because httpd may interpret backslashes as an "escape character" sequence, you should consistently use forward slashes in path names, not backslashes. While filenames are generally case-insensitive on Windows, URLs are still treated internally as case-sensitive before they are mapped to the filesystem. For example, the <Location> , Alias , and ProxyPass directives all use case-sensitive arguments. For this reason, it is particularly important to use the <Directory> directive when attempting to limit access to content in the filesystem, since this directive applies to any content in a directory, regardless of how it is accessed.

If you wish to assure that only lowercase is used in URLs, you can use something like: RewriteEngine On RewriteMap lowercase "int:tolower" RewriteCond "%{REQUEST_URI}" "[A-Z]" RewriteRule "(.*)" "${lowercase:$1}" [R,L] When running, httpd needs write access only to the logs directory and any configured cache directory tree. Due to the issue of case insensitive and short 8.3 format names, httpd must validate all path names given.

This means that each directory which httpd evaluates, from the drive root up to the directory leaf, must have read, list and traverse directory permissions. If Apache2.5 is installed at C:\Program Files, then the root directory, Program Files and Apache2.5 must all be visible to httpd. httpd for Windows contains the ability to load modules at runtime, without recompiling the server. If httpd is compiled normally, it will install a number of optional modules in the \Apache2.5\modules directory.

To activate these or other modules, the LoadModule directive must be used. For example, to activate 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. httpd can also load ISAPI (Internet Server Application Programming Interface) extensions such as those used by Microsoft IIS and other Windows servers.

More information is available . Note that httpd cannot load ISAPI Filters, and ISAPI Handlers with some Microsoft feature extensions will not work. When running CGI scripts, the method httpd 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 in Windows, you may find it useful to change the name of this per-directory configuration file using the AccessFilename directive.

Any errors during httpd startup are logged into the Windows event log when running on Windows NT. This mechanism acts as a backup for those situations where httpd is not yet prepared to use the error.log file. You can review the Windows Application Event Log by using the Event Viewer, e.g. Start - Settings - Control Panel - Administrative Tools - Event Viewer. Running httpd as a Service ¶ Apache httpd comes with a utility called the Apache Service Monitor.

With it you can see and manage the state of all installed httpd services on any machine on your network. To be able to manage an httpd service with the monitor, you have to first install the service (either automatically via the installation or manually). You can install httpd as a Windows NT service as follows from the command prompt at the httpd bin subdirectory: httpd.exe -k install If you need to specify the name of the service you want to install, use the following command.

You have to do this if you have several different service installations of httpd on your computer. If you specify a name during the install, you have to also specify it during any other -k operation. httpd.exe -k install -n "MyServiceName" If you need to have specifically named configuration files for different services, you must use this: httpd.exe -k install -n "MyServiceName" -f "c:\files\my.conf" If you use the first command without any special parameters except -k install , the service will be called Apache2.5 and the configuration will be assumed to be conf\httpd.conf .

Removing an ht

The rest of this page is on the live site.