]> granicus.if.org Git - apache/blob - docs/manual/platform/windows.html.en
docs: rebuild
[apache] / docs / manual / platform / windows.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
5 <!--
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7               This file is generated from xml source: DO NOT EDIT
8         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9       -->
10 <title>Using Apache HTTP Server on Microsoft Windows - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
15 </script>
16
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
18 <body id="manual-page"><div id="page-header">
19 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
20 <p class="apache">Apache HTTP Server Version 2.5</p>
21 <img alt="" src="../images/feather.png" /></div>
22 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
23 <div id="path">
24 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Platform Specific Notes</a></div><div id="page-content"><div id="preamble"><h1>Using Apache HTTP Server on Microsoft Windows</h1>
25 <div class="toplang">
26 <p><span>Available Languages: </span><a href="../en/platform/windows.html" title="English">&nbsp;en&nbsp;</a> |
27 <a href="../ko/platform/windows.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
28 </div>
29
30     <p>This document explains how to install, configure and run
31     Apache 2.5 under Microsoft Windows.  If you have questions after
32     reviewing the documentation (and any event and error logs), you
33     should consult the peer-supported
34     <a href="http://httpd.apache.org/userslist.html">users' mailing
35     list</a>.</p>
36
37     <p>This document assumes that you are installing a binary
38     distribution of Apache. If you want to compile Apache yourself
39     (possibly to help with development or tracking down bugs),
40     see <a href="win_compiling.html">Compiling Apache for Microsoft
41     Windows</a>.</p>
42   </div>
43 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#req">Operating System Requirements</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#down">Downloading Apache for Windows</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#cust">Customizing Apache for Windows</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#winsvc">Running Apache as a Service</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#wincons">Running Apache as a Console Application</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#test">Testing the Installation</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#windrivemap">Configuring Access to Network Resources</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#tuning">Windows Tuning</a></li>
51 </ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
52 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
53 <div class="section">
54 <h2><a name="req" id="req">Operating System Requirements</a></h2>
55     
56
57     <p>The primary Windows platform for running Apache 2.5 is Windows
58     2000 or later. Always obtain and
59     install the current service pack to avoid operating system bugs.</p>
60
61     <div class="note">Apache HTTP Server versions later than 2.2 will not run on any
62     operating system earlier than Windows 2000.</div>
63   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
64 <div class="section">
65 <h2><a name="down" id="down">Downloading Apache for Windows</a></h2>
66     
67
68     <p>The Apache HTTP Server Project itself does not provide binary releases of
69     software, only source code. Individual committers <em>may</em> provide
70     binary packages as a convenience, but it is not a release deliverable.</p>
71     <p>If you cannot compile the Apache HTTP Server
72     yourself, you can obtain a binary package from numerous binary distributions
73     available on the Internet.</p>
74
75     <p>Popular options for deploying Apache httpd, and, optionally, PHP
76     and MySQL, on Microsoft Windows, include:</p>
77     <ul>
78     <li><a href="http://www.apachehaus.com/cgi-bin/download.plx">ApacheHaus</a></li>
79     <li><a href="http://www.apachelounge.com/download/">Apache Lounge</a></li>
80     <li><a href="http://bitnami.com/stack/wamp">Bitnami WAMP Stack</a></li>
81     <li><a href="http://www.wampserver.com/">WampServer</a></li>
82     <li><a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a></li>
83     </ul>
84   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
85 <div class="section">
86 <h2><a name="cust" id="cust">Customizing Apache for Windows</a></h2>
87     
88
89     <p>Apache is configured by the files in the <code>conf</code>
90     subdirectory. These are the same files used to configure the Unix
91     version, but there are a few different directives for Apache on
92     Windows. See the <a href="../mod/directives.html">directive index</a>
93     for all the available directives.</p>
94
95     <p>The main differences in Apache for Windows are:</p>
96     <ul>
97       <li><p>Because Apache for Windows is multithreaded, it does not
98       use a separate process for each request, as Apache can on Unix.
99       Instead there are usually only two Apache processes running: a
100       parent process, and a child which handles the requests. Within
101       the child process each request is handled by a separate thread.
102       </p>
103
104       <p>The process management directives are also different:</p>
105
106       <p><code class="directive"><a href="../mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code>:
107       Like the Unix directive, this controls how many connections a single
108       child process will serve before exiting.
109       However, unlike on Unix, a replacement process is not instantly
110       available.  Use the default <code>MaxConnectionsPerChild 0</code>,
111       unless instructed to change the behavior to overcome a memory leak
112       in third party modules or in-process applications.</p>
113
114       <div class="warning"><strong>Warning: The server configuration
115       file is reread when a new child process is started. If you have
116       modified <code>httpd.conf</code>, the new child may not start or
117       you may receive unexpected results.</strong></div>
118
119       <p><code class="directive"><a href="../mod/mpm_common.html#threadsperchild">ThreadsPerChild</a></code>:
120       This directive is new. It tells the server how many threads it
121       should use. This is the maximum number of connections the server
122       can handle at once, so be sure to set this number high enough for
123       your site if you get a lot of hits. The recommended default is
124       <code>ThreadsPerChild 150</code>, but this must be adjusted to
125       reflect the greatest anticipated number of simultaneous
126       connections to accept.</p></li>
127
128       <li><p>The directives that accept filenames as arguments must use
129       Windows filenames instead of Unix ones. However, because Apache
130       may interpret backslashes as an "escape character" sequence, you
131       should consistently use forward slashes in path names, not
132       backslashes.</p></li>
133
134       <li><p>While filenames are generally case-insensitive on
135       Windows, URLs are still treated internally as case-sensitive
136       before they are mapped to the filesystem.  For example, the
137       <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>,
138       <code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code>, and <code class="directive"><a href="../mod/mod_proxy.html#proxypass">ProxyPass</a></code> directives all use
139       case-sensitive arguments.  For this reason, it is particularly
140       important to use the <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code> directive when attempting
141       to limit access to content in the filesystem, since this
142       directive applies to any content in a directory, regardless of
143       how it is accessed.  If you wish to assure that only lowercase
144       is used in URLs, you can use something like:</p>
145
146       <pre class="prettyprint lang-config">RewriteEngine On
147 RewriteMap lowercase "int:tolower"
148 RewriteCond "%{REQUEST_URI}" "[A-Z]"
149 RewriteRule "(.*)"           "${lowercase:$1}" [R,L]</pre>
150 </li>
151
152       <li><p>When running, Apache needs write access only to the logs
153       directory and any configured cache directory tree.  Due to the
154       issue of case insensitive and short 8.3 format names, Apache must
155       validate all path names given.  This means that each directory
156       which Apache evaluates, from the drive root up to the directory
157       leaf, must have read, list and traverse directory permissions.
158       If Apache2.5 is installed at C:\Program Files, then the root
159       directory, Program Files and Apache2.5 must all be visible
160       to Apache.</p></li>
161
162       <li><p>Apache for Windows contains the ability to load modules at
163       runtime, without recompiling the server. If Apache is compiled
164       normally, it will install a number of optional modules in the
165       <code>\Apache2.5\modules</code> directory. To activate these or
166       other modules, the <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>
167       directive must be used. For example, to activate the status
168       module, use the following (in addition to the status-activating
169       directives in <code>access.conf</code>):</p>
170
171       <pre class="prettyprint lang-config">LoadModule status_module "modules/mod_status.so"</pre>
172
173
174       <p>Information on <a href="../mod/mod_so.html#creating">creating
175       loadable modules</a> is also available.</p></li>
176
177       <li><p>Apache can also load ISAPI (Internet Server Application
178       Programming Interface) extensions such as those used by Microsoft
179       IIS and other Windows servers. <a href="../mod/mod_isapi.html">More
180       information is available</a>. Note that Apache <strong>cannot</strong>
181       load ISAPI Filters, and ISAPI Handlers with some Microsoft feature
182       extensions will not work.</p></li>
183
184       <li><p>When running CGI scripts, the method Apache uses to find
185       the interpreter for the script is configurable using the
186       <code class="directive"><a href="../mod/core.html#scriptinterpretersource">ScriptInterpreterSource</a></code>
187       directive.</p></li>
188
189       <li><p>Since it is often difficult to manage files with names
190       like <code>.htaccess</code> in Windows, you may find it useful to
191       change the name of this per-directory configuration file using
192       the <code class="directive"><a href="../mod/core.html#accessfilename">AccessFilename</a></code>
193       directive.</p></li>
194
195       <li><p>Any errors during Apache startup are logged into the
196       Windows event log when running on Windows NT. This mechanism
197       acts as a backup for those situations where Apache is not yet
198       prepared to use the <code>error.log</code> file. You can
199       review the Windows Application Event Log by using the Event Viewer,
200       e.g. Start - Settings - Control Panel - Administrative Tools
201       - Event Viewer.</p></li>
202     </ul>
203
204   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
205 <div class="section">
206 <h2><a name="winsvc" id="winsvc">Running Apache as a Service</a></h2>
207     
208
209     <p>Apache comes with a utility called the Apache Service Monitor.
210     With it you can see and manage the state of all installed Apache
211     services on any machine on your network. To be able to manage an
212     Apache service with the monitor, you have to first install the
213     service (either automatically via the installation or manually).
214     </p>
215
216     <p>You can install Apache as a Windows NT service as follows from
217     the command prompt at the Apache <code>bin</code> subdirectory:</p>
218
219     <div class="example"><p><code>
220       httpd.exe -k install
221     </code></p></div>
222
223     <p>If you need to specify the name of the service you want to
224     install, use the following command. You have to do this if you
225     have several different service installations of Apache on your
226     computer. If you specify a name during the install, you have to
227     also specify it during any other -k operation.</p>
228
229     <div class="example"><p><code>
230       httpd.exe -k install -n "MyServiceName"
231     </code></p></div>
232
233     <p>If you need to have specifically named configuration files for
234     different services, you must use this:</p>
235
236     <div class="example"><p><code>
237       httpd.exe -k install -n "MyServiceName" -f "c:\files\my.conf"
238     </code></p></div>
239
240     <p>If you use the first command without any special parameters except
241     <code>-k install</code>, the service will be called <code>Apache2.5</code>
242     and the configuration will be assumed to be <code>conf\httpd.conf</code>.
243     </p>
244
245     <p>Removing an Apache service is easy. Just use:</p>
246
247     <div class="example"><p><code>
248       httpd.exe -k uninstall
249     </code></p></div>
250
251     <p>The specific Apache service to be uninstalled can be specified by using:</p>
252
253     <div class="example"><p><code>
254       httpd.exe -k uninstall -n "MyServiceName"
255     </code></p></div>
256
257     <p>Normal starting, restarting and shutting down of an Apache
258     service is usually done via the Apache Service Monitor, by using
259     commands like <code>NET START Apache2.5</code> and <code>NET STOP
260     Apache2.5</code> or via normal Windows service management. Before
261     starting Apache as a service by any means, you should test the
262     service's configuration file by using:</p>
263
264     <div class="example"><p><code>
265       httpd.exe -n "MyServiceName" -t
266     </code></p></div>
267
268     <p>You can control an Apache service by its command line switches,
269     too. To start an installed Apache service you'll use this:</p>
270
271     <div class="example"><p><code>
272       httpd.exe -k start -n "MyServiceName"
273     </code></p></div>
274
275     <p>To stop an Apache service via the command line switches, use
276     this:</p>
277
278     <div class="example"><p><code>
279       httpd.exe -k stop -n "MyServiceName"
280     </code></p></div>
281
282     <p>or</p>
283
284     <div class="example"><p><code>
285       httpd.exe -k shutdown -n "MyServiceName"
286     </code></p></div>
287
288     <p>You can also restart a running service and force it to reread
289     its configuration file by using:</p>
290
291     <div class="example"><p><code>
292       httpd.exe -k restart -n "MyServiceName"
293     </code></p></div>
294
295     <p>By default, all Apache services are registered to run as the
296     system user (the <code>LocalSystem</code> account). The
297     <code>LocalSystem</code> account has no privileges to your network
298     via any Windows-secured mechanism, including the file system, named
299     pipes, DCOM, or secure RPC. It has, however, wide privileges locally.
300     </p>
301
302     <div class="warning"><strong>Never grant any network privileges to
303     the <code>LocalSystem</code> account! If you need Apache to be able
304     to access network resources, create a separate account for Apache as
305     noted below.</strong></div>
306
307     <p>It is recommended that users create a separate account for running
308     Apache service(s). If you have to access network resources via Apache,
309     this is required.</p>
310
311     <ol>
312       <li>Create a normal domain user account, and be sure to
313       memorize its password.</li>
314
315       <li>Grant the newly-created user a privilege of <code>Log on
316       as a service</code> and <code>Act as part of the operating
317       system</code>. On Windows NT 4.0 these privileges are granted via
318       User Manager for Domains, but on Windows 2000 and XP you probably
319       want to use Group Policy for propagating these settings. You can
320       also manually set these via the Local Security Policy MMC snap-in.
321       </li>
322
323       <li>Confirm that the created account is a member of the Users
324       group.</li>
325
326       <li>Grant the account read and execute (RX) rights to all document
327       and script folders (<code>htdocs</code> and <code>cgi-bin</code>
328       for example).</li>
329
330       <li>Grant the account change (RWXD) rights to the
331       Apache <code>logs</code> directory.</li>
332
333       <li>Grant the account read and execute (RX) rights to the
334       <code>httpd.exe</code> binary executable.</li>
335     </ol>
336
337     <div class="note">It is usually a good practice to grant the user the Apache
338     service runs as read and execute (RX) access to the whole Apache2.5
339     directory, except the <code>logs</code> subdirectory, where the
340     user has to have at least change (RWXD) rights.</div>
341
342     <p>If you allow the account to log in as a user and as a service,
343     then you can log on with that account and test that the account has
344     the privileges to execute the scripts, read the web pages, and that
345     you can start Apache in a console window. If this works, and you
346     have followed the steps above, Apache should execute as a service
347     with no problems.</p>
348
349     <div class="note"><strong>Error code 2186</strong> is a good indication that
350     you need to review the "Log On As" configuration for the service,
351     since Apache cannot access a required network resource. Also, pay
352     close attention to the privileges of the user Apache is
353     configured to run as.</div>
354
355     <p>When starting Apache as a service you may encounter an error
356     message from the Windows Service Control Manager. For example,
357     if you try to start Apache by using the Services applet in the
358     Windows Control Panel, you may get the following message:</p>
359
360     <div class="example"><p><code>
361       Could not start the Apache2.5 service on \\COMPUTER <br />
362       Error 1067; The process terminated unexpectedly.
363     </code></p></div>
364
365     <p>You will get this generic error if there is any problem with
366     starting the Apache service. In order to see what is really causing
367     the problem you should follow the instructions for Running Apache
368     for Windows from the Command Prompt.</p>
369
370     <p>If you are having problems with the service, it is suggested
371     you follow the instructions below to try starting httpd.exe from
372     a console window, and work out the errors before struggling to
373     start it as a service again.</p>
374   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
375 <div class="section">
376 <h2><a name="wincons" id="wincons">Running Apache as a Console Application</a></h2>
377     
378
379     <p>Running Apache as a service is usually the recommended way to
380     use it, but it is sometimes easier to work from the command line,
381     especially during initial configuration and testing.</p>
382
383     <p>To run Apache from the command line as a console application,
384     use the following command:</p>
385
386     <div class="example"><p><code>
387       httpd.exe
388     </code></p></div>
389
390     <p>Apache will execute, and will remain running until it is stopped
391     by pressing Control-C.</p>
392
393     <p>You can also run Apache via the shortcut Start Apache in Console
394     placed to <code>Start Menu --&gt; Programs --&gt; Apache HTTP Server
395     2.5.xx --&gt; Control Apache Server</code> during the installation.
396     This will open a console window and start Apache inside it. If you
397     don't have Apache installed as a service, the window will remain
398     visible until you stop Apache by pressing Control-C in the console
399     window where Apache is running in. The server will exit in a few
400     seconds. However, if you do have Apache installed as a service, the
401     shortcut starts the service. If the Apache service is running
402     already, the shortcut doesn't do anything.</p>
403
404     <p>If Apache is running as a service, you can tell it to stop by opening another console
405     window and entering:</p>
406
407     <div class="example"><p><code>
408       httpd.exe -k shutdown
409     </code></p></div>
410
411     <p>Running as a service should be preferred over running in a
412     console window because this lets Apache end any current operations
413     and clean up gracefully.</p>
414
415     <p>But if the server is running in a console window, you can
416     only stop it by pressing Control-C in the same window.</p>
417
418     <p>You can also tell Apache to restart. This forces it to reread
419     the configuration file. Any operations in progress are allowed to
420     complete without interruption. To restart Apache, either press
421     Control-Break in the console window you used for starting Apache,
422     or enter</p>
423
424     <div class="example"><p><code>
425       httpd.exe -k restart
426     </code></p></div>
427
428     <p>if the server is running as a service.</p>
429
430     <div class="note">Note for people familiar with the Unix version of Apache:
431     these commands provide a Windows equivalent to <code>kill -TERM
432     <em>pid</em></code> and <code>kill -USR1 <em>pid</em></code>. The
433     command line option used, <code>-k</code>, was chosen as a reminder
434     of the <code>kill</code> command used on Unix.</div>
435
436     <p>If the Apache console window closes immediately or unexpectedly
437     after startup, open the Command Prompt from the Start Menu --&gt;
438     Programs. Change to the folder to which you installed Apache, type
439     the command <code>httpd.exe</code>, and read the error message. Then
440     change to the logs folder, and review the <code>error.log</code>
441     file for configuration mistakes. Assuming httpd was installed into
442     <code>C:\Program Files\Apache Software Foundation\Apache2.5\</code>,
443     you can do the following:</p>
444
445     <div class="example"><p><code>
446       c: <br />
447       cd "\Program Files\Apache Software Foundation\Apache2.5\bin" <br />
448       httpd.exe
449     </code></p></div>
450
451     <p>Then wait for Apache to stop, or press Control-C. Then enter the
452     following:</p>
453
454     <div class="example"><p><code>
455       cd ..\logs <br />
456       more &lt; error.log
457     </code></p></div>
458
459     <p>When working with Apache it is important to know how it will
460     find the configuration file. You can specify a configuration file
461     on the command line in two ways:</p>
462
463     <ul>
464       <li><p><code>-f</code> specifies an absolute or relative path to
465       a particular configuration file:</p>
466
467       <div class="example"><p><code>
468         httpd.exe -f "c:\my server files\anotherconfig.conf"
469       </code></p></div>
470
471       <p>or</p>
472
473       <div class="example"><p><code>
474         httpd.exe -f files\anotherconfig.conf
475       </code></p></div></li>
476
477       <li><p><code>-n</code> specifies the installed Apache service
478       whose configuration file is to be used:</p>
479
480       <div class="example"><p><code>
481         httpd.exe -n "MyServiceName"
482       </code></p></div>
483       </li>
484     </ul>
485
486     <p>In both of these cases, the proper
487     <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> should be set in
488     the configuration file.</p>
489
490     <p>If you don't specify a configuration file with <code>-f</code>
491     or <code>-n</code>, Apache will use the file name compiled into the
492     server, such as <code>conf\httpd.conf</code>. This built-in path
493     is relative to the installation directory. You can verify the compiled
494     file name from a value labelled as <code>SERVER_CONFIG_FILE</code> when
495     invoking Apache with the <code>-V</code> switch, like this:</p>
496
497     <div class="example"><p><code>
498       httpd.exe -V
499     </code></p></div>
500
501     <p>Apache will then try to determine its <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> by trying the following, in this order:</p>
502
503     <ol>
504       <li>A <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> directive
505       via the <code>-C</code> command line switch.</li>
506
507       <li>The <code>-d</code> switch on the command line.</li>
508
509       <li>Current working directory.</li>
510
511       <li>A registry entry which was created if you did a binary
512       installation.</li>
513
514       <li>The server root compiled into the server. This is <code>
515       /apache</code> by default, you can verify it by using <code>
516       httpd.exe -V</code> and looking for a value labelled as
517       <code>HTTPD_ROOT</code>.</li>
518     </ol>
519
520     <p>If you did not do a binary install, Apache will in some
521     scenarios complain about the missing registry key. This warning can
522     be ignored if the server was otherwise able to find its
523     configuration file.</p>
524
525     <p>The value of this key is the
526     <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> directory which
527     contains the <code>conf</code> subdirectory. When Apache starts it
528     reads the <code>httpd.conf</code> file from that directory. If
529     this file contains a <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>
530     directive which contains a different directory from the one
531     obtained from the registry key above, Apache will forget the
532     registry key and use the directory from the configuration file. If
533     you copy the Apache directory or configuration files to a new
534     location it is vital that you update the
535     <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> directive in the
536     <code>httpd.conf</code> file to reflect the new location.</p>
537   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
538 <div class="section">
539 <h2><a name="test" id="test">Testing the Installation</a></h2>
540     
541
542     <p>After starting Apache (either in a console window or as a
543     service) it will be listening on port 80 (unless you changed the
544     <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive in the
545     configuration files or installed Apache only for the current user).
546     To connect to the server and access the default page, launch a
547     browser and enter this URL:</p>
548
549     <div class="example"><p><code>
550       http://localhost/
551     </code></p></div>
552
553     <p>Apache should respond with a welcome page and you should see
554     "It Works!". If nothing happens or you get an error, look in the
555     <code>error.log</code> file in the <code>logs</code> subdirectory.
556     If your host is not connected to the net, or if you have serious
557     problems with your DNS (Domain Name Service) configuration, you
558     may have to use this URL:</p>
559
560     <div class="example"><p><code>
561       http://127.0.0.1/
562     </code></p></div>
563
564     <p>If you happen to be running Apache on an alternate port, you
565     need to explicitly put that in the URL:</p>
566
567     <div class="example"><p><code>
568       http://127.0.0.1:8080/
569     </code></p></div>
570
571     <p>Once your basic installation is working, you should configure it
572     properly by editing the files in the <code>conf</code> subdirectory.
573     Again, if you change the configuration of the Windows NT service
574     for Apache, first attempt to start it from the command line to
575     make sure that the service starts with no errors.</p>
576
577     <p>Because Apache <strong>cannot</strong> share the same port with
578     another TCP/IP application, you may need to stop, uninstall or reconfigure
579     certain other services before running Apache. These conflicting
580     services include other WWW servers, some firewall implementations,
581     and even some client applications (such as Skype) which will use port
582     80 to attempt to bypass firewall issues.</p>
583   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
584 <div class="section">
585 <h2><a name="windrivemap" id="windrivemap">Configuring Access to Network Resources</a></h2>
586     
587
588   <p>Access to files over the network can be specified using two
589   mechanisms provided by Windows:</p>
590
591   <dl>
592     <dt>Mapped drive letters</dt>
593     <dd>e.g., <code>Alias /images/ Z:/</code></dd>
594
595     <dt>UNC paths</dt>
596     <dd>e.g., <code>Alias /images/ //imagehost/www/images/</code></dd>
597   </dl>
598
599   <p>Mapped drive letters allow the administrator to maintain the
600   mapping to a specific machine and path outside of the Apache httpd
601   configuration.  However, these mappings are associated only with
602   interactive sessions and are not directly available to Apache httpd
603   when it is started as a service.  <strong>Use only UNC paths for
604   network resources in httpd.conf</strong> so that the resources can
605   be accessed consistently regardless of how Apache httpd is started.
606   (Arcane and error prone procedures may work around the restriction
607   on mapped drive letters, but this is not recommended.)</p>
608
609   <div class="example"><h3>Example DocumentRoot with UNC path</h3><pre class="prettyprint lang-config">DocumentRoot "//dochost/www/html/"</pre>
610 </div>
611
612   <div class="example"><h3>Example DocumentRoot with IP address in UNC path</h3><pre class="prettyprint lang-config">DocumentRoot "//192.168.1.50/docs/"</pre>
613 </div>
614
615   <div class="example"><h3>Example Alias and corresponding Directory with UNC path</h3><pre class="prettyprint lang-config">Alias "/images/" "//imagehost/www/images/"
616
617 &lt;Directory "//imagehost/www/images/"&gt;
618 #...
619 &lt;Directory&gt;</pre>
620 </div>
621
622   <p>When running Apache httpd as a service, you must create a
623   separate account in order to access network resources, as described
624   above.</p>
625   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
626 <div class="section">
627 <h2><a name="tuning" id="tuning">Windows Tuning</a></h2>
628     
629     <ul>
630       <li><p>If more than a few dozen piped loggers are used on an operating system
631       instance, scaling up the "desktop heap" is often necessary. For
632       more detailed information, refer to the <a href="../logs.html#piped">piped logging</a> documentation.</p></li>
633     </ul>
634   </div></div>
635 <div class="bottomlang">
636 <p><span>Available Languages: </span><a href="../en/platform/windows.html" title="English">&nbsp;en&nbsp;</a> |
637 <a href="../ko/platform/windows.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
638 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
639 <script type="text/javascript"><!--//--><![CDATA[//><!--
640 var comments_shortname = 'httpd';
641 var comments_identifier = 'http://httpd.apache.org/docs/trunk/platform/windows.html';
642 (function(w, d) {
643     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
644         d.write('<div id="comments_thread"><\/div>');
645         var s = d.createElement('script');
646         s.type = 'text/javascript';
647         s.async = true;
648         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
649         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
650     }
651     else {
652         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
653     }
654 })(window, document);
655 //--><!]]></script></div><div id="footer">
656 <p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
657 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
658 if (typeof(prettyPrint) !== 'undefined') {
659     prettyPrint();
660 }
661 //--><!]]></script>
662 </body></html>