54fa287ac0c32e02a62568c0f02f8a00000a3398nd<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
54fa287ac0c32e02a62568c0f02f8a00000a3398nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0a5e1567f7fa7f5706c68d09f744673c6cb99b33nd This file is generated from xml source: DO NOT EDIT
54fa287ac0c32e02a62568c0f02f8a00000a3398nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<title>Getting Started - Apache HTTP Server Version 2.5</title>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<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" />
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<script src="/style/scripts/prettify.min.js" type="text/javascript">
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<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>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="./">Version 2.5</a></div><div id="page-content"><div id="preamble"><h1>Getting Started</h1>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<p><span>Available Languages: </span><a href="/en/getting-started.html" title="English"> en </a> |
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<a href="/fr/getting-started.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<p>If you're completely new to the Apache HTTP Server, or even to running
54fa287ac0c32e02a62568c0f02f8a00000a3398nda website at all, you might not know where to start, or what questions to
54fa287ac0c32e02a62568c0f02f8a00000a3398ndask. This document walks you through the basics.</p>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#clientserver">Clients, Servers, and URLs</a></li>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<li><img alt="" src="/images/down.gif" /> <a href="#dns">Hostnames and DNS</a></li>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<li><img alt="" src="/images/down.gif" /> <a href="#configuration">Configuration Files and Directives</a></li>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<li><img alt="" src="/images/down.gif" /> <a href="#content">Web Site Content</a></li>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<li><img alt="" src="/images/down.gif" /> <a href="#logs">Log Files and Troubleshooting</a></li>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<li><img alt="" src="/images/down.gif" /> <a href="#other">What's next?</a></li>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<h2><a name="clientserver" id="clientserver">Clients, Servers, and URLs</a></h2>
54fa287ac0c32e02a62568c0f02f8a00000a3398ndAddresses on the Web are expressed with URLs - Uniform Resource Locators
54fa287ac0c32e02a62568c0f02f8a00000a3398nd- which specify a protocol (e.g. <code>http</code>), a servername (e.g.
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<code>/docs/current/getting-started.html</code>), and possibly a query
54fa287ac0c32e02a62568c0f02f8a00000a3398ndstring (e.g. <code>?arg=value</code>) used to pass additional
54fa287ac0c32e02a62568c0f02f8a00000a3398ndarguments to the server.
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<p>A client (e.g., a web browser) connects to a server (e.g., your Apache HTTP Server),
54fa287ac0c32e02a62568c0f02f8a00000a3398ndwith the specified protocol, and makes a <strong>request</strong> for a resource using the
54fa287ac0c32e02a62568c0f02f8a00000a3398ndURL-path.</p>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<p>The URL-path may represent any number of things on the server. It may
54fa287ac0c32e02a62568c0f02f8a00000a3398ndbe a file (like <code>getting-started.html</code>) a handler (like <a href="mod/mod_status.html">server-status</a>) or some kind of program
54fa287ac0c32e02a62568c0f02f8a00000a3398ndfile (like <code>index.php</code>). We'll discuss this more below in
54fa287ac0c32e02a62568c0f02f8a00000a3398ndThe server will send a <strong>response</strong> consisting of a status
54fa287ac0c32e02a62568c0f02f8a00000a3398ndcode and, optionally, a response body.
54fa287ac0c32e02a62568c0f02f8a00000a3398ndThe status code indicates whether the request was successful, and, if not, what
54fa287ac0c32e02a62568c0f02f8a00000a3398ndkind of error condition there was. This tells the client what it should
54fa287ac0c32e02a62568c0f02f8a00000a3398nddo with the response. You can read about the possible response codes in
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<a href="http://wiki.apache.org/httpd/CommonHTTPStatusCodes">HTTP Server
54fa287ac0c32e02a62568c0f02f8a00000a3398nd<p>Details of the transaction, and any error conditions, are written to
54fa287ac0c32e02a62568c0f02f8a00000a3398ndlog files. This is discussed in greater detail below in the <a href="#logs">Logs Files and Troubleshooting</a> section.</p>
54fa287ac0c32e02a62568c0f02f8a00000a3398nd</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
127.0.0.1 www.example.com
<p>You can read more about the hosts file at <a href="http://en.wikipedia.org/wiki/Hosts_(file)">Wikipedia.org/wiki/Hosts_(file)</a>, and
more about DNS at <a href="http://en.wikipedia.org/wiki/Domain_Name_System">Wikipedia.org/wiki/Domain_Name_System</a>.</p>
for ease of management. These files are loaded via the <code class="directive"><a href="/mod/core.html#include">Include</a></code> directive. The names or locations of
<p>The server is configured by placing <a href="mod/quickreference.html">configuration directives</a> in these
in the configuration file, outside of any <code class="directive"><a href="/mod/core.html#directory"><Directory></a></code>, <code class="directive"><a href="/mod/core.html#location"><Location></a></code>, <code class="directive"><a href="/mod/core.html#virtualhost"><VirtualHost></a></code>, or other section. If it is to
<code class="directive"><a href="/mod/core.html#directory"><Directory></a></code> section referring to
<code>.htaccess</code> files in the <a href="howto/htaccess.html"><code>.htaccess</code> howto</a>.</p>
and other files that reside in the filesystem. The <code class="directive"><a href="/mod/core.html#documentroot">DocumentRoot</a></code> directive specifies where in your
ways that dynamic content may be generated. Various <a href="handler.html">handlers</a> are available to generate content. <a href="howto/cgi.html">CGI programs</a> may be written to generate
<p>The location of the error log is defined by the <code class="directive"><a href="/mod/core.html#errorlog">ErrorLog</a></code> directive, which may be set globally,
<p><span>Available Languages: </span><a href="/en/getting-started.html" title="English"> en </a> |
<a href="/fr/getting-started.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a></p>
</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&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>
var comments_identifier = 'http://httpd.apache.org/docs/trunk/getting-started.html';
if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
d.write('<div id="comments_thread"><\/div>');
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
(d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
<p class="apache">Copyright 2015 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>
<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[//><!--