[[Email protected] ~] # Vim-N/usr/local/apache2/CONF/httpd. conf
1 #
2 # This is the main Apache HTTP server configuration file. It contains
3 # configuration directives that give the server its instructions.
4 # See <URL: http://httpd.apache.org/docs/2.2> for detailed information.
5 # In particle, see
6 # <URL: http://httpd.apache.org/docs/2.2/mod/directives.html>
7 # For a discussion of each configuration directive.
8 #
9 # Do not simply read the instructions in here without understanding
10 # what they do. They're here only as hints or reminders. If you are unsure
11 # consult the online docs. You have been warned.
12 #
13 # configuration and logfile names: If the filenames you specify for Example
14 # Of the server's control files begin with "/" (or "drive:/" for Win32),
15 # server will use that explicit path. If the filenames do * not * begin
16 # With "/", the value of serverroot is prepended -- so 'Log/access_log'
17 # With serverroot set to '/WWW' will be interpreted by
18 # server as '/www/log/access_log', where as '/log/access_log' will be
19 # interpreted as '/log/access_log '.
20
21 #
22 # serverroot: The top of the directory tree under which the server's
23 # configuration, error, and log files are kept.
24 #
25 # Do not add a slash at the end of the directory path. If you point
26 # serverroot at a non-local disk, be sure to point the lockfile Directive
27 # at a local disk. If you want to share the same serverroot for multiple
28 # httpd daemons, you will need to change at least lockfile and pidfile.
29 #
30 serverroot "/usr/local/apache2"
31
32 #
33 # Listen: allows you to bind Apache to specific IP addresses and/or
34 # ports, instead of the default. See also the <virtualhost>
35 # directive.
36 #
37 # change this to listen on specific IP addresses as shown below
38 # prevent Apache from glomming onto all bound IP addresses.
39 #
40 # Listen 12.34.56.78: 80
41 listen 80
42
43 #
44 # dynamic shared object (DSO) Support
45 #
46 # to be able to use the functionality of a module which was built as a DSO you
47 # have to place corresponding 'loadmodule' lines at this location so
48 # directives contained in it are actually available _ before _ they are used.
49 # statically compiled modules (those listed by 'httpd-l') do not need
50 # to be loaded here.
51 #
52 # example:
53 # loadmodule foo_module modules/mod_foo.so
54 #
55
56 <ifmodule! Mpm_netware_module>
57 <ifmodule! Mpm_winnt_module>
58 #
59 # If you wish httpd to run as a different user or group, you must run
60 # httpd as root initially and it will switch.
61 #
62 # user/group: The name (or # number) of the user/group to run httpd.
63 # It is usually good practice to create a dedicated user and group
64 # Running httpd, as with most system services.
65 #
66 user daemon
67 group daemon
68
69 </ifmodule>
70 </ifmodule>
71
72 # 'main' Server Configuration
73 #
74 # the directives in this section set up the values used by the 'main'
75 # server, which responds to any requests that aren't handled by
76 # <virtualhost> definition. These values also provide defaults
77 # Any <virtualhost> containers you may define later in the file.
78 #
79 # All of these directives may appear inside <virtualhost> containers,
80 # In which case these default settings will be overridden for
81 # virtual host being defined.
82 #
83
84 #
85 # serveradmin: Your address, where problems with the server shocould be
86 # e-mailed. This address appears on some server-generated pages, such
87 # As error documents. e.g. [email protected]
88 #
89 serveradmin [email protected]
90
91 #
92 # servername gives the name and port that the server uses to identify itself.
93 # This can often be determined automatically, but we recommend you specify
94 # It explicitly to prevent problems during startup.
95 #
96 # If your host doesn' t have a registered DNS name, enter its IP address here.
97 #
98 # servername www.example.com: 80
99 servername localhost: 80
100
101 #
102 # DocumentRoot: the directory out of which you will serve your
103 # events. By default, all requests are taken from this directory,
104 # symbolic links and aliases may be used to point to other locations.
105 #
106 DocumentRoot "/usr/local/apache2/htdocs"
107
108 #
109 # Each directory to which Apache has access can be configured with respect
110 # to which services and features are allowed and/or disabled in that
111 # directory (and its subdirectories ).
112 #
113 # first, we configure the "default" to be a very restrictive set
114 # features.
115 #
116 <directory/>
117 options followsymlinks
118 AllowOverride none
119 order deny, allow
120 deny from all
121 </directory>
122
123 #
124 # note that from this point forward you must specifically allow
125 # particle features to be enabled-so if something's not working
126 # You might reset CT, make sure that you have specifically enabled it
127 # below.
128 #
129
130 #
131 # This shoshould be changed to whatever you set DocumentRoot.
132 #
133 <directory "/usr/local/apache2/htdocs">
134 #
135 # possible values for the options directive are "NONE", "all ",
136 # or any combination:
137 # indexes includes followsymlinks symlinksifownermatch execcgi Multiviews
138 #
139 # note that "Multiviews" must be named * explicitly * --- "options all"
140 # doesn' t give it to you.
141 #
142 # The options directive is both complicated and important. Please see
143 # http://httpd.apache.org/docs/2.2/mod/core.html#options
144 # for more information.
145 #
146 options indexes followsymlinks
147
148 #
149 # AllowOverride controls what directives may be placed in. htaccess files.
150 # It Can Be "all", "NONE", or any combination of the keywords:
151 # options fileinfo authconfig limit
152 #
153 AllowOverride none
154
155 #
156 # controls who can get stuff from this server.
157 #
158 order allow, deny
159 allow from all
160
161 </directory>
162
163 #
164 # directoryindex: sets the file that Apache will serve if a directory
165 # is requested.
166 #
167 <ifmodule dir_module>
168 directoryindex index.html
169 </ifmodule>
170
171 #
172 # the following lines prevent. htaccess and. htpasswd files from being
173 # viewed by web clients.
174 #
175 <filesmatch "^ \. ht">
176 order allow, deny
177 deny from all
178 satisfy all
179 </filesmatch>
180
181 #
182 # errorlog: the location of the error log file.
183 # If you do not specify an errorlog directive within a <virtualhost>
184 # container, error messages relating to that virtual host will be
185 # logged here. If you * do * define an error logfile for a <virtualhost>
186 # container, that host's errors will be logged there and not here.
187 #
188 errorlog "logs/error_log"
189
190 #
191 # loglevel: control the number of messages logged to the error_log.
192 # possible values include: Debug, info, notice, warn, error, crit,
193 # Alert, emerg.
194 #
195 loglevel warn
196
197 <ifmodule log_config_module>
198 #
199 # The following Directives define some format nicknames for use
200 # A customlog Directive (see below ).
201 #
202 logformat "% H % L % u % t \" % R \ "%> S % B \" % {Referer} I \ "\" % {User-Agent} I \ "" combined
203 logformat "% H % L % u % t \" % R \ "%> S % B" common
204
205 <ifmodule logio_module>
206 # You need to enable mod_logio.c to use % I and % O
207 logformat "% H % L % u % t \" % R \ "%> S % B \" % {Referer} I \ "\" % {User-Agent} I \ "% I % O" combinedio
208 </ifmodule>
209
210 #
211 # The location and format of the access logfile (Common logfile format ).
212 # If you do not define any access logfiles within a <virtualhost>
213 # container, they will be logged here. Contrariwise, if you * do *
214 # define per-<virtualhost> access logfiles, transactions will be
215 # logged therein and * not * in this file.
216 #
217 customlog "logs/access_log" common
218
219 #
220 # If you prefer a logfile with access, agent, and referer information
221 # (combined logfile format) You can use the following Directive.
222 #
223 # customlog "logs/access_log" combined
224 </ifmodule>
225
226 <ifmodule alias_module>
227 #
228 # redirect: allows you to tell clients about users that used
229 # exist in your server's namespace, but do not anymore. The client
230 # will make a new request for the document at its new location.
231 # example:
232 # redirect permanent/Foo http://www.example.com/bar
233
234 #
235 # Alias: maps web Paths into filesystem paths and is used
236 # access content that does not live under the DocumentRoot.
237 # example:
238 # Alias/webpath/full/filesystem/path
239 #
240 # If you include a trailing/on/webpath then the server will
241 # require it to be present in the URL. You will also likely
242 # need to provide a <directory> section to allow access
243 # The filesystem path.
244
245 #
246 # ScriptAlias: This controls which directories contain server scripts.
247 # scriptaliases are essential the same as aliases, doesn't that
248 # documents in the target directory are treated as applications and
249 # Run by the server when requested rather than as your ents sent to
250 # client. The same rules about trailing "/" apply to ScriptAlias
251 # directives as to alias.
252 #
253 ScriptAlias/cgi-bin/"/usr/local/apache2/cgi-bin /"
254
255 </ifmodule>
256
257 <ifmodule cgid_module>
258 #
259 # scriptsock: On threaded servers, designate the path to the Unix
260 # socket used to communicate with the CGI daemon of mod_cgid.
261 #
262 # scriptsock logs/cgisock
263 </ifmodule>
264
265 #
266 # "/usr/local/apache2/cgi-bin" shocould be changed to whatever your scriptaliased
267 # CGI directory exists, if you have that configured.
268 #
269 <directory "/usr/local/apache2/cgi-bin">
270 AllowOverride none
271 options none
272 order allow, deny
273 allow from all
274 </directory>
275
276 #
277 # defaulttype: the default MIME type the server will use for a document
278 # if it cannot otherwise determine one, such as from filename extensions.
279 # If your server contains mostly text or HTML documents, "text/plain" is
280 # A good value. If most of your content is binary, such as applications
281 # or images, you may want to use "application/octet-stream" instead
282 # Keep browsers from trying to display binary files as though they are
283 # text.
284 #
285 defaulttype text/plain
286
287 <ifmodule mime_module>
288 #
289 # typesconfig points to the file containing the list of mappings from
290 # filename extension to mime-type.
291 #
292 typesconfig CONF/mime. Types
293
294 #
295 # addtype allows you to add to or override the mime Configuration
296 # file specified in typesconfig for specific file types.
297 #
298 # addtype application/X-gzip. tgz
299 #
300 # addencoding allows you to have certain browsers uncompress
301 # Information on the fly. Note: not all browsers support this.
302 #
303 # addencoding X-compress. Z
304 # addencoding X-gzip. GZ. tgz
305 #
306 # If the addencoding directives abve are commented-out, then you
307 # Probably shocould define those extensions to indicate media types:
308 #
309 addtype application/X-compress. Z
310 addtype application/X-gzip. GZ. tgz
311
312 #
313 # addhandler allows you to map certain file extensions to "handlers ":
314 # actions unrelated to filetype. These can be either built into the server
315 # Or added with the Action Directive (see below)
316 #
317 # To use CGI scripts outside of scriptaliased directories:
318 # (you will also need to add "execcgi" to the "options" directive .)
319 #
320 # addhandler CGI-script. cgi
321
322 # For type maps (negotiated resources ):
323 # addhandler type-map VaR
324
325 #
326 # filters allow you to process content before it is sent to the client.
327 #
328 # to parse. shtml files for server-side pair des (SSI ):
329 # (you will also need to add "includes" to the "options" directive .)
330 #
331 # addtype text/html. shtml
332 # addoutputfilter between des. shtml
333 </ifmodule>
334
335 #
336 # The mod_mime_magic module allows the server to use varous hints from
337 # contents of the file itself to determine its type. The mimemagicfile
338 # directive tells the module where the hint definitions are located.
339 #
340 # mimemagicfile CONF/magic
341
342 #
343 # customizable error responses come in three flavors:
344 #1) plain text 2) Local redirects 3) External redirects
345 #
346 # some examples:
347 # errordocument 500 "the server made a boo ."
348 # errordocument 404/missing.html
349 # errordocument 404 "/cgi-bin/missing_handler.pl"
350 # errordocument 402 http://www.example.com/subscription_info.html
351 #
352
353 #
354 # maxranges: Maximum number of ranges in a request before
355 # returning the entire resource, or one of the special
356 # values 'default', 'None' or 'unlimited '.
357 # default setting is to accept 200 ranges.
358 # maxranges Unlimited
359
360 #
361 # enablemmap and enablesendfile: on systems that support it,
362 # Memory-mapping or the sendfile syscall is used to deliver
363 # files. This usually improves server performance, but must
364 # be turned off when serving from networked-mounted
365 # filesystems or if support for these functions is otherwise
366 # broken on your system.
367 #
368 # enablemmap off
369 # enablesendfile off
370
371 # supplemental Configuration
372 #
373 # the configuration files in the conf/extra/directory can be
374 # added to add extra features or to modify the default configuration
375 # the server, or you may simply copy their contents here and change
376 # necessary.
377
378 # server-pool management (MPM specific)
379 # include CONF/extra/httpd-mpm.conf
380
381 # multi-language error messages
382 # include CONF/extra/httpd-multilang-errordoc.conf
383
384 # Fancy directory listings
385 # include CONF/extra/httpd-autoindex.conf
386
387 # Language settings
388 # include CONF/extra/httpd-languages.conf
389
390 # user home directories
391 # include CONF/extra/httpd-userdir.conf
392
393 # Real-time info on requests and Configuration
394 # include CONF/extra/httpd-info.conf
395
396 # Virtual Hosts
397 # include CONF/extra/httpd-vhosts.conf
398
399 # local access to the Apache HTTP Server Manual
400 # include CONF/extra/httpd-manual.conf
401
402 # Distributed Authoring and Versioning (webDAV)
403 # include CONF/extra/httpd-dav.conf
404
405 # various default settings
406 # include CONF/extra/httpd-default.conf
407
408 # Secure (SSL/TLS) connections
409 # include CONF/extra/httpd-ssl.conf
410 #
411 # Note: The following must be present to support
412 # Starting Without SSL on platforms with no/dev/random equivalent
413 # But a statically compiled-in mod_ssl.
414 #
415 <ifmodule ssl_module>
416 sslrandomseed startup builtin
417 sslrandomseed connect builtin
418 </ifmodule>
Vim/usr/local/apache2/CONF/httpd. conf