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