1 # |
|
2 # This is the main Apache HTTP server configuration file. It contains the |
|
3 # configuration directives that give the server its instructions. |
|
4 # See <URL:http://httpd.apache.org/docs/2.2> for detailed information. |
|
5 # In particular, 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 many |
|
14 # of the server's control files begin with "/" (or "drive:/" for Win32), the |
|
15 # server will use that explicit path. If the filenames do *not* begin |
|
16 # with "/", the value of ServerRoot is prepended -- so "/var/apache2/2.2/logs/foo.log" |
|
17 # with ServerRoot set to "/usr/apache2/2.2" will be interpreted by the |
|
18 # server as "/usr/apache2/2.2//var/apache2/2.2/logs/foo.log". |
|
19 |
|
20 # |
|
21 # ServerRoot: The top of the directory tree under which the server's |
|
22 # configuration, error, and log files are kept. |
|
23 # |
|
24 # Do not add a slash at the end of the directory path. If you point |
|
25 # ServerRoot at a non-local disk, be sure to point the LockFile directive |
|
26 # at a local disk. If you wish to share the same ServerRoot for multiple |
|
27 # httpd daemons, you will need to change at least LockFile and PidFile. |
|
28 # |
|
29 ServerRoot "/usr/apache2/2.2" |
|
30 |
|
31 # |
|
32 # Dynamic Shared Object (DSO) Support |
|
33 # |
|
34 # To be able to use the functionality of a module which was built as a DSO you |
|
35 # have to place corresponding `LoadModule' lines at this location so the |
|
36 # directives contained in it are actually available _before_ they are used. |
|
37 # Statically compiled modules (those listed by `httpd -l') do not need |
|
38 # to be loaded here. |
|
39 # |
|
40 <IfDefine 64bit> |
|
41 Include /etc/apache2/2.2/conf.d/modules-64.load |
|
42 </IfDefine> |
|
43 <IfDefine !64bit> |
|
44 Include /etc/apache2/2.2/conf.d/modules-32.load |
|
45 </IfDefine> |
|
46 |
|
47 |
|
48 <IfModule !mpm_netware_module> |
|
49 # |
|
50 # If you wish httpd to run as a different user or group, you must run |
|
51 # httpd as root initially and it will switch. |
|
52 # |
|
53 # User/Group: The name (or #number) of the user/group to run httpd as. |
|
54 # It is usually good practice to create a dedicated user and group for |
|
55 # running httpd, as with most system services. |
|
56 # |
|
57 User webservd |
|
58 Group webservd |
|
59 </IfModule> |
|
60 |
|
61 # 'Main' server configuration |
|
62 # |
|
63 # The directives in this section set up the values used by the 'main' |
|
64 # server, which responds to any requests that aren't handled by a |
|
65 # <VirtualHost> definition. These values also provide defaults for |
|
66 # any <VirtualHost> containers you may define later in the file. |
|
67 # |
|
68 # All of these directives may appear inside <VirtualHost> containers, |
|
69 # in which case these default settings will be overridden for the |
|
70 # virtual host being defined. |
|
71 # |
|
72 |
|
73 # |
|
74 # ServerAdmin: Your address, where problems with the server should be |
|
75 # e-mailed. This address appears on some server-generated pages, such |
|
76 # as error documents. e.g. [email protected] |
|
77 # |
|
78 ServerAdmin root@localhost |
|
79 |
|
80 # |
|
81 # ServerName gives the name and port that the server uses to identify itself. |
|
82 # This can often be determined automatically, but we recommend you specify |
|
83 # it explicitly to prevent problems during startup. |
|
84 # |
|
85 # If your host doesn't have a registered DNS name, enter its IP address here. |
|
86 # |
|
87 ServerName 127.0.0.1 |
|
88 |
|
89 # |
|
90 # Each directory to which Apache has access can be configured with respect |
|
91 # to which services and features are allowed and/or disabled in that |
|
92 # directory (and its subdirectories). |
|
93 # |
|
94 # First, we configure the "default" to be a very restrictive set of |
|
95 # features. |
|
96 # |
|
97 <Directory /> |
|
98 Options FollowSymLinks |
|
99 AllowOverride None |
|
100 Order deny,allow |
|
101 Deny from all |
|
102 </Directory> |
|
103 |
|
104 # |
|
105 # Note that from this point forward you must specifically allow |
|
106 # particular features to be enabled - so if something's not working as |
|
107 # you might expect, make sure that you have specifically enabled it |
|
108 # below. |
|
109 # |
|
110 |
|
111 # |
|
112 # DirectoryIndex: sets the file that Apache will serve if a directory |
|
113 # is requested. |
|
114 # |
|
115 <IfModule dir_module> |
|
116 DirectoryIndex index.html |
|
117 </IfModule> |
|
118 |
|
119 # |
|
120 # The following lines prevent .htaccess and .htpasswd files from being |
|
121 # viewed by Web clients. |
|
122 # |
|
123 <FilesMatch "^\.ht"> |
|
124 Order allow,deny |
|
125 Deny from all |
|
126 Satisfy All |
|
127 </FilesMatch> |
|
128 |
|
129 # |
|
130 # ErrorLog: The location of the error log file. |
|
131 # If you do not specify an ErrorLog directive within a <VirtualHost> |
|
132 # container, error messages relating to that virtual host will be |
|
133 # logged here. If you *do* define an error logfile for a <VirtualHost> |
|
134 # container, that host's errors will be logged there and not here. |
|
135 # |
|
136 ErrorLog /var/apache2/2.2/logs/error_log |
|
137 |
|
138 # |
|
139 # LogLevel: Control the number of messages logged to the error_log. |
|
140 # Possible values include: debug, info, notice, warn, error, crit, |
|
141 # alert, emerg. |
|
142 # |
|
143 LogLevel warn |
|
144 |
|
145 <IfModule log_config_module> |
|
146 # |
|
147 # The following directives define some format nicknames for use with |
|
148 # a CustomLog directive (see below). |
|
149 # |
|
150 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined |
|
151 LogFormat "%h %l %u %t \"%r\" %>s %b" common |
|
152 |
|
153 <IfModule logio_module> |
|
154 # You need to enable mod_logio.c to use %I and %O |
|
155 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio |
|
156 </IfModule> |
|
157 |
|
158 # |
|
159 # The location and format of the access logfile (Common Logfile Format). |
|
160 # If you do not define any access logfiles within a <VirtualHost> |
|
161 # container, they will be logged here. Contrariwise, if you *do* |
|
162 # define per-<VirtualHost> access logfiles, transactions will be |
|
163 # logged therein and *not* in this file. |
|
164 # |
|
165 CustomLog /var/apache2/2.2/logs/access_log common |
|
166 |
|
167 # |
|
168 # If you prefer a logfile with access, agent, and referer information |
|
169 # (Combined Logfile Format) you can use the following directive. |
|
170 # |
|
171 #CustomLog /var/apache2/2.2/logs/access_log combined |
|
172 </IfModule> |
|
173 |
|
174 <IfModule alias_module> |
|
175 # |
|
176 # Redirect: Allows you to tell clients about documents that used to |
|
177 # exist in your server's namespace, but do not anymore. The client |
|
178 # will make a new request for the document at its new location. |
|
179 # Example: |
|
180 # Redirect permanent /foo http://www.example.com/bar |
|
181 |
|
182 # |
|
183 # Alias: Maps web paths into filesystem paths and is used to |
|
184 # access content that does not live under the DocumentRoot. |
|
185 # Example: |
|
186 # Alias /webpath /full/filesystem/path |
|
187 # |
|
188 # If you include a trailing / on /webpath then the server will |
|
189 # require it to be present in the URL. You will also likely |
|
190 # need to provide a <Directory> section to allow access to |
|
191 # the filesystem path. |
|
192 |
|
193 # |
|
194 # ScriptAlias: This controls which directories contain server scripts. |
|
195 # ScriptAliases are essentially the same as Aliases, except that |
|
196 # documents in the target directory are treated as applications and |
|
197 # run by the server when requested rather than as documents sent to the |
|
198 # client. The same rules about trailing "/" apply to ScriptAlias |
|
199 # directives as to Alias. |
|
200 # |
|
201 ScriptAlias /cgi-bin/ "/var/apache2/2.2/cgi-bin/" |
|
202 |
|
203 </IfModule> |
|
204 |
|
205 <IfModule cgid_module> |
|
206 # |
|
207 # ScriptSock: On threaded servers, designate the path to the UNIX |
|
208 # socket used to communicate with the CGI daemon of mod_cgid. |
|
209 # |
|
210 #Scriptsock /var/run/apache2/2.2/cgisock |
|
211 </IfModule> |
|
212 |
|
213 # |
|
214 # "/var/apache2/2.2/cgi-bin" should be changed to whatever your ScriptAliased |
|
215 # CGI directory exists, if you have that configured. |
|
216 # |
|
217 # <Directory "/var/apache2/2.2/cgi-bin"> |
|
218 # AllowOverride None |
|
219 # Options None |
|
220 # Order allow,deny |
|
221 # Allow from all |
|
222 # </Directory> |
|
223 |
|
224 # |
|
225 # DefaultType: the default MIME type the server will use for a document |
|
226 # if it cannot otherwise determine one, such as from filename extensions. |
|
227 # If your server contains mostly text or HTML documents, "text/plain" is |
|
228 # a good value. If most of your content is binary, such as applications |
|
229 # or images, you may want to use "application/octet-stream" instead to |
|
230 # keep browsers from trying to display binary files as though they are |
|
231 # text. |
|
232 # |
|
233 DefaultType text/plain |
|
234 |
|
235 <IfModule mime_module> |
|
236 # |
|
237 # TypesConfig points to the file containing the list of mappings from |
|
238 # filename extension to MIME-type. |
|
239 # |
|
240 TypesConfig /etc/apache2/2.2/mime.types |
|
241 |
|
242 # |
|
243 # AddType allows you to add to or override the MIME configuration |
|
244 # file specified in TypesConfig for specific file types. |
|
245 # |
|
246 #AddType application/x-gzip .tgz |
|
247 # |
|
248 # AddEncoding allows you to have certain browsers uncompress |
|
249 # information on the fly. Note: Not all browsers support this. |
|
250 # |
|
251 #AddEncoding x-compress .Z |
|
252 #AddEncoding x-gzip .gz .tgz |
|
253 # |
|
254 # If the AddEncoding directives above are commented-out, then you |
|
255 # probably should define those extensions to indicate media types: |
|
256 # |
|
257 AddType application/x-compress .Z |
|
258 AddType application/x-gzip .gz .tgz |
|
259 |
|
260 # |
|
261 # AddHandler allows you to map certain file extensions to "handlers": |
|
262 # actions unrelated to filetype. These can be either built into the server |
|
263 # or added with the Action directive (see below) |
|
264 # |
|
265 # To use CGI scripts outside of ScriptAliased directories: |
|
266 # (You will also need to add "ExecCGI" to the "Options" directive.) |
|
267 # |
|
268 AddHandler cgi-script .cgi |
|
269 |
|
270 <IfModule mod_perl.c> |
|
271 AddHandler perl-script .pl |
|
272 |
|
273 PerlResponseHandler ModPerl::Registry |
|
274 PerlOptions +ParseHeaders |
|
275 </IfModule> |
|
276 |
|
277 # For type maps (negotiated resources): |
|
278 #AddHandler type-map var |
|
279 |
|
280 # |
|
281 # Filters allow you to process content before it is sent to the client. |
|
282 # |
|
283 # To parse .shtml files for server-side includes (SSI): |
|
284 # (You will also need to add "Includes" to the "Options" directive.) |
|
285 # |
|
286 #AddType text/html .shtml |
|
287 #AddOutputFilter INCLUDES .shtml |
|
288 </IfModule> |
|
289 |
|
290 # |
|
291 # The mod_mime_magic module allows the server to use various hints from the |
|
292 # contents of the file itself to determine its type. The MIMEMagicFile |
|
293 # directive tells the module where the hint definitions are located. |
|
294 # |
|
295 #MIMEMagicFile /etc/apache2/2.2/magic |
|
296 |
|
297 # |
|
298 # Customizable error responses come in three flavors: |
|
299 # 1) plain text 2) local redirects 3) external redirects |
|
300 # |
|
301 # Some examples: |
|
302 #ErrorDocument 500 "The server made a boo boo." |
|
303 #ErrorDocument 404 /missing.html |
|
304 #ErrorDocument 404 "/cgi-bin/missing_handler.pl" |
|
305 #ErrorDocument 402 http://www.example.com/subscription_info.html |
|
306 # |
|
307 |
|
308 # |
|
309 # EnableMMAP and EnableSendfile: On systems that support it, |
|
310 # memory-mapping or the sendfile syscall is used to deliver |
|
311 # files. This usually improves server performance, but must |
|
312 # be turned off when serving from networked-mounted |
|
313 # filesystems or if support for these functions is otherwise |
|
314 # broken on your system. |
|
315 # |
|
316 #EnableMMAP off |
|
317 #EnableSendfile off |
|
318 |
|
319 # Supplemental configuration |
|
320 # |
|
321 # Include all the .conf configuration files in the |
|
322 # /etc/apache2/2.2/conf.d/ directory. |
|
323 # |
|
324 # You can place additional configuration files in the |
|
325 # /etc/apache2/2.2/conf.d/ directory to add extra features |
|
326 # or to modify the default configuration of the server, |
|
327 # or you may simply copy their contents here and change as |
|
328 # necessary. |
|
329 # |
|
330 # Sample configuration files are in the |
|
331 # /etc/apache2/2.2/samples-conf.d directory. To use a |
|
332 # sample .conf file, copy it to /etc/apache2/2.2/conf.d |
|
333 # directory and modify as required. |
|
334 # |
|
335 Include /etc/apache2/2.2/conf.d/*.conf |
|
336 |
|
337 # |
|
338 # Visual Panels will supply SSL configuration(s) |
|
339 # Include /etc/apache2/2.2/conf.d/ssl.conf |
|
340 |
|
341 # |
|
342 # Note: The following must must be present to support |
|
343 # starting without SSL on platforms with no /dev/random equivalent |
|
344 # but a statically compiled-in mod_ssl. |
|
345 # |
|
346 <IfModule ssl_module> |
|
347 SSLRandomSeed startup builtin |
|
348 SSLRandomSeed connect builtin |
|
349 </IfModule> |
|
350 |
|
351 <IfModule prefork.c> |
|
352 ListenBacklog 8192 |
|
353 ServerLimit 2048 |
|
354 MaxClients 2048 |
|
355 </IfModule> |
|
356 |
|
357 # |
|
358 # Virtual Hosts |
|
359 # |
|
360 # If you want to maintain multiple domains/hostnames on your |
|
361 # machine you can setup VirtualHost containers for them. Most configurations |
|
362 # use only name-based virtual hosts so the server doesn't need to worry about |
|
363 # IP addresses. This is indicated by the asterisks in the directives below. |
|
364 # |
|
365 # Please see the documentation at |
|
366 # <URL:http://httpd.apache.org/docs/2.2/vhosts/> |
|
367 # for further details before you try to setup virtual hosts. |
|
368 # |
|
369 # You may use the command line option '-S' to verify your virtual host |
|
370 # configuration. |
|
371 |
|