]> granicus.if.org Git - apache/blob - docs/manual/platform/windows.xml
b4bfac271a3c17e63c7a310f77122a32f21d8492
[apache] / docs / manual / platform / windows.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4
5 <manualpage metafile="windows.xml.meta">
6   <relativepath href=".." />
7   <parentdocument href="./">Platform Specific Notes</parentdocument>
8
9   <title>Using Apache with Microsoft Windows</title>
10
11   <summary>
12
13     <p>This document explains how to install, configure and run
14     Apache 2.0 under Microsoft Windows. If you find any bugs, or
15     wish to contribute in other ways, please use our <a
16     href="http://httpd.apache.org/bug_report.html">bug reporting
17     page</a>.</p>
18
19     <p>This document assumes that you are installing a binary
20     distribution of Apache. If you want to compile Apache yourself
21     (possibly to help with development or tracking down bugs),
22     see <a href="win_compiling.html">Compiling Apache for Microsoft
23     Windows</a>.</p>
24
25     <p><strong>Because of the current versioning policies on Microsoft
26     Windows operating system families, this document assumes the
27     following:</strong></p>
28     <ul>
29       <li><strong>Windows NT:</strong> This means all versions of
30       Windows that are based on the Windows NT kernel. Includes Windows
31       NT, Windows 2000, Windows XP and Windows .Net Server 2003.</li>
32       <li><strong>Windows 9x:</strong> This means older,
33       consumer-oriented versions of Windows. Includes Windows 95 (also
34       OSR2), Windows 98 and Windows ME.</li>
35     </ul>
36
37   </summary>
38
39   <section id="req">
40     <title>Operating System Requirements</title>
41
42     <p>The primary Windows platform for running Apache 2.0 is Windows
43     NT. The binary installer only works with the x86 family of
44     processors, such as Intel and AMD processors. Running Apache on
45     Windows 9x is not thoroughly tested, and it is never recommended on
46     production systems.
47     </p>
48
49     <p>On all operating systems, TCP/IP networking must be installed
50     and working. If running on Windows 95, the Winsock 2 upgrade must
51     be installed. Winsock 2 for Windows 95 can be downloaded from <a
52     href="http://www.microsoft.com/windows95/downloads/contents/WUAdminTools/S_WUNetworkingTools/W95Sockets2/Default.asp">here</a>.
53     </p>
54
55     <p>On Windows NT 4.0, installing Service Pack 6 is strongly
56     recommended, as Service Pack 4 created known issues with TCP/IP
57     and Winsock integrity that were resolved in later Service Packs.</p>
58   </section>
59
60   <section id="down">
61     <title>Downloading Apache for Windows</title>
62
63     <p>Information on the latest versions of Apache can be found on the
64     web site of the Apache web server at
65     <a href="http://httpd.apache.org/download.cgi">http://httpd.apache.org/download.cgi</a>.
66     There you will find the current release, as well as more recent alpha
67     or beta test versions, and a list of HTTP and FTP mirrors from which
68     you can download the Apache web server. Please use a mirror near to
69     you for a fast and reliable download.</p>
70
71     <p>For Windows installations you should download the version of
72     Apache for Windows with the <code>.msi</code> extension. This is a
73     single Microsoft Installer file, which contains a ready-to-run
74     version of Apache. There is a separate <code>.zip</code> file,
75     which contains only the source code. You can compile Apache
76     yourself with the Microsoft Visual C++ (Visual Studio) tools.</p>
77   </section>
78
79   <section id="inst">
80     <title>Installing Apache for Windows</title>
81
82     <p>You need Microsoft Installer 1.2 or above for the installation
83     to work. On Windows 9x you can update your Microsoft Installer to
84     version 2.0 <a
85     href="http://www.microsoft.com/downloads/release.asp?ReleaseID=32831">here</a>
86     and on Windows NT 4.0 and 2000 the version 2.0 update can be found
87     <a href="http://www.microsoft.com/downloads/release.asp?ReleaseID=32832">here</a>.
88     Windows XP does not need this update.</p>
89
90     <p>Note that you cannot install two versions of Apache 2.0 on the
91     same computer with the binary installer. You can, however, install
92     a version of the 1.3 series <strong>and</strong> a version of the
93     2.0 series on the same computer without problems. If you need to
94     have two different 2.0 versions on the same computer, you have to
95     <a href="win_compiling.html">compile and install Apache from the
96     source</a>.</p>
97
98     <p>Run the Apache <code>.msi</code> file you downloaded above. The
99     installation will ask you for these things:</p>
100
101     <ol>
102       <li><p><strong>Network Domain.</strong> Enter the DNS domain in which
103       your server is or will be registered in. For example, if your
104       server's full DNS name is <code>server.mydomain.net</code>, you would
105       type <code>mydomain.net</code> here.</p></li>
106
107       <li><p><strong>Server Name.</strong> Your server's full DNS name.
108       From the example above, you would type <code>server.mydomain.net</code>
109       here.</p></li>
110
111       <li><p><strong>Administrator's Email Address.</strong> Enter the
112       server administrator's or webmaster's email address here. This
113       address will be displayed along with error messages to the client
114       by default.</p></li>
115
116       <li><p><strong>For whom to install Apache</strong> Select <code>for
117       All Users, on Port 80, as a Service - Recommended</code> if you'd
118       like your new Apache to listen at port 80 for incoming traffic.
119       It will run as a service (that is, Apache will run even if no one
120       is logged in on the server at the moment) Select <code>only for
121       the Current User, on Port 8080, when started Manually</code> if
122       you'd like to install Apache for your personal experimenting or
123       if you already have another WWW server running on port 80.</p></li>
124
125       <li><p><strong>The installation type.</strong> Select <code>Typical</code>
126       for everything except the source code and libraries for module
127       development. With <code>Custom</code> you can specify what to
128       install. A full install will require about 13 megabytes of free
129       disk space. This does <em>not</em> include the size of your web
130       site(s).</p></li>
131
132       <li><p><strong>Where to install.</strong> The default path is
133       <code>C:\Program Files\Apache Group</code> under which a directory
134       called <code>Apache2</code> will be created by default.</p></li>
135     </ol>
136
137     <p>During the installation, Apache will configure the files in the
138     <code>conf</code> subdirectory to reflect the chosen installation
139     directory. However, if any of the configuration files in this
140     directory already exist, they will not be overwritten. Instead, the
141     new copy of the corresponding file will be left with the extension
142     <code>.default</code>. So, for example, if <code>conf\httpd.conf</code>
143     already exists, it will be renamed as <code>conf\httpd.conf.default</code>.
144     After the installation you should manually check to see what new
145     settings are in the <code>.default</code> file, and if necessary,
146     update your existing configuration file.</p>
147
148     <p>Also, if you already have a file called <code>htdocs\index.html</code>,
149     it will not be overwritten (and no <code>index.html.default</code>
150     will be installed either). This means it should be safe to install
151     Apache over an existing installation, although you would have to
152     stop the existing running server before doing the installation, and
153     then start the new one after the installation is finished.</p>
154
155     <p>After installing Apache, you must edit the configuration files
156     in the <code>conf</code> subdirectory as required. These files
157     will be configured during the installation so that Apache is ready
158     to be run from the directory it was installed into, with the
159     documents server from the subdirectory <code>htdocs</code>. There
160     are lots of other options which you should set before you really
161     start using Apache. However, to get started quickly, the files
162     should work as installed.</p>
163   </section>
164
165   <section id="cust">
166     <title>Customizing Apache for Windows</title>
167
168     <p>Apache is configured by the files in the <code>conf</code>
169     subdirectory. These are the same files used to configure the Unix
170     version, but there are a few different directives for Apache on
171     Windows. See the <a href="../mod/directives.html">directive index</a>
172     for all the available directives.</p>
173
174     <p>The main differences in Apache for Windows are:</p>
175     <ul>
176       <li><p>Because Apache for Windows is multithreaded, it does not
177       use a separate process for each request, as Apache does on Unix.
178       Instead there are usually only two Apache processes running: a
179       parent process, and a child which handles the requests. Within
180       the child process each request is handled by a separate thread.
181       </p>
182
183       <p>The process management directives are also different:</p>
184
185       <p><directive module="mpm_common">MaxRequestsPerChild</directive>:
186       Like the Unix directive, this controls how many requests a single
187       child process will serve before exiting. However, unlike on Unix,
188       a single process serves all the requests at once, not just one.
189       If this is set, it is recommended that a very high number is
190       used. The recommended default, <code>MaxRequestsPerChild 0</code>,
191       causes the child process to never exit.</p>
192
193       <note type="warning"><strong>Warning: The server configuration
194       file is reread when a new child process is started. If you have
195       modified <code>httpd.conf</code>, the new child may not start or
196       you may receive unexpected results.</strong></note>
197
198       <p><directive module="mpm_common">ThreadsPerChild</directive>:
199       This directive is new. It tells the server how many threads it
200       should use. This is the maximum number of connections the server
201       can handle at once, so be sure to set this number high enough for
202       your site if you get a lot of hits. The recommended default is
203       <code>ThreadsPerChild 50</code>.</p></li>
204
205       <li><p>The directives that accept filenames as arguments must use
206       Windows filenames instead of Unix ones. However, because Apache
207       uses Unix-style names internally, you must use forward slashes,
208       not backslashes. Drive letters can be used; if omitted, the drive
209       with the Apache executable will be assumed.</p></li>
210
211       <li><p>Apache for Windows contains the ability to load modules at
212       runtime, without recompiling the server. If Apache is compiled
213       normally, it will install a number of optional modules in the
214       <code>\Apache2\modules</code> directory. To activate these or
215       other modules, the new <directive module="mod_so">LoadModule</directive>
216       directive must be used. For example, to activate the status
217       module, use the following (in addition to the status-activating
218       directives in <code>access.conf</code>):</p>
219
220       <example>
221         LoadModule status_module modules/mod_status.so
222       </example>
223
224       <p>Information on <a href="../mod/mod_so.html#creating">creating
225       loadable modules</a> is also available.</p></li>
226
227       <li><p>Apache can also load ISAPI (Internet Server Application
228       Programming Interface) extensions (i.e. internet server
229       applications), such as those used by Microsoft IIS and other
230       Windows servers. <a href="../mod/mod_isapi.html">More information
231       is available</a>. Note that Apache <strong>cannot</strong> load
232       ISAPI Filters.</p></li>
233
234       <li><p>When running CGI scripts, the method Apache uses to find
235       the interpreter for the script is configurable using the
236       <directive module="core">ScriptInterpreterSource</directive>
237       directive.</p></li>
238
239       <li><p>Since it is often difficult to manage files with names
240       like <code>.htaccess</code> in Windows, you may find it useful to
241       change the name of this per-directory configuration file using
242       the <directive module="core">AccessFilename</directive>
243       directive.</p></li>
244
245       <li><p>Any errors during Apache startup are logged into the
246       Windows event log when running on Windows NT. This mechanism
247       acts as a backup for those situations where Apache cannot even
248       access the normally used <code>error.log</code> file. You can
249       view the Windows event log by using the Event Viewer application
250       on Windows NT 4.0, and the Event Viewer MMC snap-in on newer
251       versions of Windows.</p>
252
253       <note><strong>Note that there is no startup error logging on
254       Windows 9x because no Windows event log exists on those operating
255       systems.</strong></note></li>
256     </ul>
257
258   </section>
259
260   <section id="winsvc">
261     <title>Running Apache as a Service</title>
262
263     <p>Apache can be run as a service on Windows NT. There is some
264     highly experimental support for similar behavior on Windows 9x.</p>
265
266     <p>You can install Apache as a service automatically during the
267     installation. If you chose to install for all users, the
268     installation will create an Apache service for you. If you specify
269     to install for yourself only, you can manually register Apache as a
270     service after the installation. You have to be a member of the
271     Administrators group for the service installation to succeed.</p>
272
273     <p>Apache comes with a utility called the Apache Service Monitor.
274     With it you can see and manage the state of all installed Apache
275     services on any machine on your network. To be able to manage an
276     Apache service with the monitor, you have to first install the
277     service (either automatically via the installation or manually).
278     </p>
279
280     <p>You can install Apache as a Windows NT service as follows from
281     the command prompt at the Apache <code>bin</code> subdirectory:</p>
282
283     <example>
284       apache -k install
285     </example>
286
287     <p>If you need to specify the name of the service you want to
288     install, use the following command. You have to do this if you
289     have several different service installations of Apache on your
290     computer.</p>
291
292     <example>
293       apache -k install -n "MyServiceName"
294     </example>
295
296     <p>If you need to have specifically named configuration files for
297     different services, you must use this:</p>
298
299     <example>
300       apache -k install -n "MyServiceName" -f "c:\files\my.conf"
301     </example>
302
303     <p>If you use the first command without any special parameters except
304     <code>-k install</code>, the service will be called <code>Apache2</code>
305     and the configuration will be assumed to be <code>conf\httpd.conf</code>.
306     </p>
307
308     <p>Removing an Apache service is easy. Just use:</p>
309
310     <example>
311       apache -k uninstall
312     </example>
313
314     <p>The specific Apache service to be uninstalled can be specified by using:</p>
315
316     <example>
317       apache -k uninstall -n "MyServiceName"
318     </example>
319
320     <p>Normal starting, restarting and shutting down of an Apache
321     service is usually done via the Apache Service Monitor, by using
322     commands like <code>NET START Apache2</code> and <code>NET STOP
323     Apache2</code> or via normal Windows service management. Before
324     starting Apache as a service by any means, you should test the
325     service's configuration file by using:</p>
326
327     <example>
328       apache -n "MyServiceName" -t
329     </example>
330
331     <p>You can control an Apache service by its command line switches,
332     too. To start an installed Apache service you'll use this:</p>
333
334     <example>
335       apache -k start
336     </example>
337
338     <p>To stop an Apache service via the command line switches, use
339     this:</p>
340
341     <example>
342       apache -k stop
343     </example>
344
345     <p>or</p>
346
347     <example>
348       apache -k shutdown
349     </example>
350
351     <p>You can also restart a running service and force it to reread
352     its configuration file by using:</p>
353
354     <example>
355       apache -k restart
356     </example>
357
358     <p>By default, all Apache services are registered to run as the
359     system user (the <code>LocalSystem</code> account). The
360     <code>LocalSystem</code> account has no privileges to your network
361     via any Windows-secured mechanism, including the file system, named
362     pipes, DCOM, or secure RPC. It has, however, wide privileges locally.
363     </p>
364
365     <note type="warning"><strong>Never grant any network privileges to
366     the <code>LocalSystem</code> account! If you need Apache to be able
367     to access network resources, create a separate account for Apache as
368     noted below.</strong></note>
369
370     <p>You may want to create a separate account for running Apache
371     service(s). Especially, if you have to access network resources
372     via Apache, this is strongly recommended.</p>
373
374     <ol>
375       <li>Create a normal domain user account, and be sure to
376       memorize its password.</li>
377
378       <li>Grant the newly-created user a privilege of <code>Log on
379       as a service</code> and <code>Act as part of the operating
380       system</code>. On Windows NT 4.0 these privileges are granted via
381       User Manager for Domains, but on Windows 2000 and XP you probably
382       want to use Group Policy for propagating these settings. You can
383       also manually set these via the Local Security Policy MMC snap-in.
384       </li>
385
386       <li>Confirm that the created account is a member of the Users
387       group.</li>
388
389       <li>Grant the account read and execute (RX) rights to all document
390       and script folders (<code>htdocs</code> and <code>cgi-bin</code>
391       for example).</li>
392
393       <li>Grant the account change (RWXD) rights to the
394       Apache <code>logs</code> directory.</li>
395
396       <li>Grant the account read and execute (RX) rights to the
397       <code>Apache.exe</code> binary executable.</li>
398     </ol>
399
400     <note>It is usually a good practice to grant the user the Apache
401     service runs as read and execute (RX) access to the whole Apache2
402     directory, except the <code>logs</code> subdirectory, where the
403     user has to have at least change (RWXD) rights.</note>
404
405     <p>If you allow the account to log in as a user and as a service,
406     then you can log on with that account and test that the account has the
407     privileges to execute the scripts, read the web pages, and that
408     you can start Apache in a console window. If this works, and you
409     have followed the steps above, Apache should execute as a service
410     with no problems.</p>
411
412     <note><strong>Error code 2186</strong> is a good indication that
413     you need to review the "Log On As" configuration for the service,
414     since Apache cannot access a required network resource. Also, pay
415     close attention to the privileges of the user Apache is
416     configured to run as.</note>
417
418     <p>When starting Apache as a service you may encounter an error
419     message from the Windows Service Control Manager. For example,
420     if you try to start Apache by using the Services applet in the
421     Windows Control Panel, you may get the following message:</p>
422
423     <example>
424       Could not start the Apache2 service on \\COMPUTER <br />
425       Error 1067; The process terminated unexpectedly.
426     </example>
427
428     <p>You will get this generic error if there is any problem with
429     starting the Apache service. In order to see what is really causing
430     the problem you should follow the instructions for Running Apache
431     for Windows from the Command Prompt.</p>
432
433     <p>There is some support for Apache on Windows 9x to behave in a
434     similar manner as a service on Windows NT. It is <strong>highly
435     experimental</strong>. It is not of production-class reliability,
436     and its future is not guaranteed. It can be mostly regarded as
437     a risky thing to play with - proceed with caution!</p>
438
439     <p>There are some differences between the two kinds of services
440     you should be aware of:</p>
441
442     <ul>
443       <li><p>Apache will attempt to start and if successful it will run
444       in the background. If you run the command</p>
445
446       <example>
447         apache -n "MyServiceName" -k start
448       </example>
449
450       <p>via a shortcut on your desktop, for example, then if the
451       service starts successfully, a console window will flash up but
452       it immediately disappears. If Apache detects any errors on startup
453       such as incorrect entries in the httpd.conf configuration file,
454       the console window will remain visible. This will display an error
455       message which will be useful in tracking down the cause of the
456       problem.</p></li>
457
458       <li><p>Windows 9x does not support <code>NET START</code> or
459       <code>NET STOP</code> commands. You must control the Apache
460       service on the command prompt via the <code>-k</code> switches.
461       </p></li>
462
463       <li><p>Apache and Windows 9x offer no support for running Apache
464       as a specific user with network privileges. In fact, Windows 9x
465       offers no security on the local machine, either. This is the
466       simple reason because of which the Apache Software Foundation
467       never endorses use of a Windows 9x -based system as a public
468       Apache server. The primitive support for Windows 9x exists only
469       to assist the user in developing web content and learning the
470       Apache server, and perhaps as an intranet server on a secured,
471       private network.</p></li>
472
473     </ul>
474
475     <p>Once you have confirmed that Apache runs correctly as a
476     console application you can install, control and uninstall the
477     pseudo-service with the same commands as on Windows NT. You can
478     also use the Apache Service Monitor to manage Windows 9x
479     pseudo-services.</p>
480
481   </section>
482
483   <section id="wincons">
484     <title>Running Apache as a Console Application</title>
485
486     <p>Running Apache as a service is usually the recommended way to
487     use it, but it is sometimes easier to work from the command line
488     (on Windows 9x running Apache from the command line is the
489     recommended way due to the lack of reliable service support.)</p>
490
491     <p>To run Apache from the command line as a console application,
492     use the following command:</p>
493
494     <example>
495       apache
496     </example>
497
498     <p>Apache will execute, and will remain running until it is stopped
499     by pressing Control-C.</p>
500
501     <p>You can also run Apache via the shortcut Start Apache in Console
502     placed to <code>Start Menu --&gt; Programs --&gt; Apache HTTP Server
503     2.0.xx --&gt; Control Apache Server</code> during the installation.
504     This will open a console window and start Apache inside it. If you
505     don't have Apache installed as a service, the window will remain
506     visible until you stop Apache by pressing Control-C in the console
507     window where Apache is running in. The server will exit in a few
508     seconds. However, if you do have Apache installed as a service, the
509     shortcut starts the service. If the Apache service is running
510     already, the shortcut doesn't do anything.</p>
511
512     <p>You can tell a running Apache to stop by opening another console
513     window and entering:</p>
514
515     <example>
516       apache -k shutdown
517     </example>
518
519     <p>This should be preferred over pressing Control-C because this
520     lets Apache end any current operations and clean up gracefully.</p>
521
522     <p>You can also tell Apache to restart. This forces it to reread
523     the configuration file. Any operations in progress are allowed to
524     complete without interruption. To restart Apache, use:</p>
525
526     <example>
527       apache -k restart
528     </example>
529
530     <note>Note for people familiar with the Unix version of Apache:
531     these commands provide a Windows equivalent to <code>kill -TERM
532     <em>pid</em></code> and <code>kill -USR1 <em>pid</em></code>. The
533     command line option used, <code>-k</code>, was chosen as a reminder
534     of the <code>kill</code> command used on Unix.</note>
535
536     <p>If the Apache console window closes immediately or unexpectedly
537     after startup, open the Command Prompt from the Start Menu --&gt;
538     Programs. Change to the folder to which you installed Apache, type
539     the command <code>apache</code>, and read the error message. Then
540     change to the logs folder, and review the <code>error.log</code>
541     file for configuration mistakes. If you accepted the defaults when
542     you installed Apache, the commands would be:</p>
543
544     <example>
545       c: <br />
546       cd "\Program Files\Apache Group\Apache2\bin" <br />
547       apache
548     </example>
549
550     <p>Then wait for Apache to stop, or press Control-C. Then enter the
551     following:</p>
552
553     <example>
554       cd ..\logs <br />
555       more &lt; error.log
556     </example>
557
558     <p>When working with Apache it is important to know how it will
559     find the configuration file. You can specify a configuration file
560     on the command line in two ways:</p>
561
562     <ul>
563       <li><p><code>-f</code> specifies an absolute or relative path to
564       a particular configuration file:</p>
565
566       <example>
567         apache -f "c:\my server files\anotherconfig.conf"
568       </example>
569
570       <p>or</p>
571
572       <example>
573         apache -f files\anotherconfig.conf
574       </example></li>
575
576       <li><p><code>-n</code> specifies the installed Apache service
577       whose configuration file is to be used:</p>
578
579       <example>
580         apache -n "MyServiceName"
581       </example>
582       </li>
583     </ul>
584
585     <p>In both of these cases, the proper
586     <directive module="core">ServerRoot</directive> should be set in
587     the configuration file.</p>
588
589     <p>If you don't specify a configuration file with <code>-f</code>
590     or <code>-n</code>, Apache will use the file name compiled into the
591     server, such as <code>conf\httpd.conf</code>. This built-in path
592     is relative to the installation directory. You can verify the compiled
593     file name from a value labelled as <code>SERVER_CONFIG_FILE</code> when
594     invoking Apache with the <code>-V</code> switch, like this:</p>
595
596     <example>
597       apache -V
598     </example>
599
600     <p>Apache will then try to determine its <directive module="core">
601     ServerRoot</directive> by trying the following, in this order:</p>
602
603     <ol>
604       <li>A <directive module="core">ServerRoot</directive> directive
605       via the <code>-C</code> command line switch.</li>
606
607       <li>The <code>-d</code> switch on the command line.</li>
608
609       <li>Current working directory.</li>
610
611       <li>A registry entry which was created if you did a binary
612       installation.</li>
613
614       <li>The server root compiled into the server. This is <code>
615       /apache</code> by default, you can verify it by using <code>
616       apache -V</code> and looking for a value labelled as
617       <code>HTTPD_ROOT</code>.</li>
618     </ol>
619
620     <p>During the installation, a version-specific registry key is
621     created in the Windows registry. The location of this key depends
622     on the type of the installation. If you chose to install Apache
623     for all users, the key is located under the
624     <code>HKEY_LOCAL_MACHINE</code> hive, like this (the version
625     numbers will of course vary between different versions of Apache:
626     </p>
627
628     <example>
629       HKEY_LOCAL_MACHINE\SOFTWARE\Apache Group\Apache\2.0.43
630     </example>
631
632     <p>Correspondingly, if you chose to install Apache for the current
633     user only, the key is located under the <code>HKEY_CURRENT_USER</code>
634     hive, the contents of which are dependent of the user currently
635     logged on:</p>
636
637     <example>
638       HKEY_CURRENT_USER\SOFTWARE\Apache Group\Apache\2.0.43
639     </example>
640
641     <p>This key is compiled into the server and can enable you to test
642     new versions without affecting the current version. Of course, you
643     must take care not to install the new version in the same
644     directory as another version.</p>
645
646     <p>If you did not do a binary install, Apache will in some
647     scenarios complain about the missing registry key. This warning can
648     be ignored if the server was otherwise able to find its
649     configuration file.</p>
650
651     <p>The value of this key is the
652     <directive module="core">ServerRoot</directive> directory which
653     contains the <code>conf</code> subdirectory. When Apache starts it
654     reads the <code>httpd.conf</code> file from that directory. If
655     this file contains a <directive module="core">ServerRoot</directive>
656     directive which contains a different directory from the one
657     obtained from the registry key above, Apache will forget the
658     registry key and use the directory from the configuration file. If
659     you copy the Apache directory or configuration files to a new
660     location it is vital that you update the
661     <directive module="core">ServerRoot</directive> directive in the
662     <code>httpd.conf</code> file to reflect the new location.</p>
663
664   </section>
665
666   <section id="test">
667     <title>Testing the Installation</title>
668
669     <p>After starting Apache (either in a console window or as a
670     service) it will be listening on port 80 (unless you changed the
671     <directive module="mpm_common">Listen</directive> directive in the
672     configuration files or installed Apache only for the current user).
673     To connect to the server and access the default page, launch a
674     browser and enter this URL:</p>
675
676     <example>
677       http://localhost/
678     </example>
679
680     <p>Apache should respond with a welcome page and a link to the
681     Apache manual. If nothing happens or you get an error, look in the
682     <code>error.log</code> file in the <code>logs</code> subdirectory.
683     If your host is not connected to the net, or if you have serious
684     problems with your DNS (Domain Name Service) configuration, you
685     may have to use this URL:</p>
686
687     <example>
688       http://127.0.0.1/
689     </example>
690
691     <p>Once your basic installation is working, you should configure it
692     properly by editing the files in the <code>conf</code> subdirectory.
693     Again, if you change the configuration of the Windows NT service
694     for Apache, first attempt to start it from the command line to
695     make sure that the service starts with no errors.</p>
696
697     <p>Because Apache <strong>cannot</strong> share the same port with
698     another TCP/IP application, you may need to stop, uninstall or reconfigure
699     certain other services before running Apache. These conflicting
700     services include other WWW servers and some firewall implementations.
701     </p>
702
703   </section>
704
705 </manualpage>