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