|
1 '\" te |
|
2 .\" Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
|
3 .TH apache24 1M "Jul 2014" "SunOS 5.12" "System Administration Commands" |
|
4 .SH NAME |
|
5 apache2 \- Apache HTTP Server Version 2.4 overview |
|
6 .SH SYNOPSIS |
|
7 .LP |
|
8 .nf |
|
9 \fBapache2\fR |
|
10 .fi |
|
11 |
|
12 .SH DESCRIPTION |
|
13 .sp |
|
14 .LP |
|
15 Apache HTTP Server Version 2.4 (Apache 2) consists of a main server daemon, |
|
16 loadable server modules, some additional support utilities, configuration |
|
17 files, and documentation. |
|
18 .sp |
|
19 .LP |
|
20 Note Apache 2.4 is 64-bit only and Apache 2.2 modules are not |
|
21 binary compatible with 2.4. |
|
22 .sp |
|
23 Several Apache 2 modules are bundled in separate packages to reduce number of |
|
24 dependencies of main package. These are: |
|
25 .sp |
|
26 .in +2 |
|
27 .nf |
|
28 web/server/apache-24/apache-dbd |
|
29 web/server/apache-24/apache-ldap |
|
30 web/server/apache-24/apache-lua |
|
31 .fi |
|
32 .in -2 |
|
33 .sp |
|
34 Apache 2 can be enabled by authorized user within the service |
|
35 management facility (SMF), using the following fault management |
|
36 resource identifier (FMRI): |
|
37 .sp |
|
38 .in +2 |
|
39 .nf |
|
40 svc:/network/http:apache24 |
|
41 .fi |
|
42 .in -2 |
|
43 .sp |
|
44 Available SMF properties are listed in the following table: |
|
45 .sp |
|
46 .TS |
|
47 tab(^G) allbox; |
|
48 cw(2.750000i)| cw(2.750000i) |
|
49 lw(2.750000i)| lw(2.750000i). |
|
50 SMF Property Name^Value |
|
51 httpd/MPM^event (default), prefork or worker |
|
52 httpd/startup_options^valid apachectl options |
|
53 .TE |
|
54 .SH FILES |
|
55 .sp |
|
56 .LP |
|
57 The following files specify the installation locations for Apache 2: |
|
58 .LP |
|
59 Note : |
|
60 .RS +4 |
|
61 .TP |
|
62 .ie t \(bu |
|
63 .el o |
|
64 The string \fB[version]\fR should be expanded |
|
65 to \fB"MAJOR.MINOR"\fR. For example, \fB/usr/apache2/2.4/*\fR. |
|
66 .RE |
|
67 .RS +4 |
|
68 .TP |
|
69 .ie t \(bu |
|
70 .el o |
|
71 To find the current version of Apache 2 installed on your |
|
72 machine, type the following command: |
|
73 .sp |
|
74 .in +2 |
|
75 .nf |
|
76 $ /usr/apache2/[version]/bin/apachectl -v |
|
77 .fi |
|
78 .in -2 |
|
79 .sp |
|
80 |
|
81 .RE |
|
82 .RE |
|
83 .sp |
|
84 .ne 2 |
|
85 .mk |
|
86 .na |
|
87 \fB\fB/etc/apache2/[version]/\fR\fR |
|
88 .ad |
|
89 .sp .6 |
|
90 .RS 4n |
|
91 Contains server configuration files. A newly-installed server |
|
92 contains a default \fBhttpd.conf\fR file. This is the main configuration file. |
|
93 .sp |
|
94 If there is need to use different main configuration file (e.g. to run |
|
95 multiple Apache 2 instances), it's possible by providing Apache '-f' |
|
96 option via SMF property httpd/startup_options. |
|
97 .RE |
|
98 |
|
99 .sp |
|
100 .ne 2 |
|
101 .mk |
|
102 .na |
|
103 \fB\fB/etc/apache2/[version]/conf.d/\fR\fR |
|
104 .ad |
|
105 .sp .6 |
|
106 .RS 4n |
|
107 Contains additional server configuration files. |
|
108 .sp |
|
109 By default, server will load all the \fB\&.conf\fR files |
|
110 placed under this directory. |
|
111 .RE |
|
112 |
|
113 .sp |
|
114 .ne 2 |
|
115 .mk |
|
116 .na |
|
117 \fB\fB/etc/apache2/[version]/envvars\fR\fR |
|
118 .ad |
|
119 .sp .6 |
|
120 .RS 4n |
|
121 File for specifying the environment settings which the server uses at |
|
122 startup. This is the user-editable version of the |
|
123 /usr/apache2/[version]/bin/envvars file. |
|
124 .sp |
|
125 Note that this is default path to envvars file only in case where main |
|
126 configuration file is in directory /etc/apache2/[version]/. If this |
|
127 is not the case Apache 2 will look for envvars file in the same |
|
128 directory where is main configuration file. |
|
129 .RE |
|
130 |
|
131 .sp |
|
132 .ne 2 |
|
133 .mk |
|
134 .na |
|
135 \fB\fB/etc/apache2/[version]/magic\fR\fR |
|
136 .ad |
|
137 .sp .6 |
|
138 .RS 4n |
|
139 Magic data for \fBmod_mime_magic\fR Apache module as documented in the |
|
140 .nf |
|
141 \fB/usr/apache2/2.2/manual/mod/mod_mime_magic.html\fR file. |
|
142 .fi |
|
143 .nf |
|
144 Editing this file is not recommended. |
|
145 .fi |
|
146 .RE |
|
147 |
|
148 .sp |
|
149 .ne 2 |
|
150 .mk |
|
151 .na |
|
152 \fB\fB/etc/apache2/[version]/mime.types\fR\fR |
|
153 .ad |
|
154 .sp .6 |
|
155 .RS 4n |
|
156 Default MIME types file. This file sets the default list of |
|
157 mappings from filename extensions to content types, changing this file is |
|
158 not recommended. Use the \fBAddType\fR directive instead. |
|
159 .RE |
|
160 |
|
161 .sp |
|
162 .ne 2 |
|
163 .mk |
|
164 .na |
|
165 \fB\fB/etc/apache2/[version]/original/\fR\fR |
|
166 .ad |
|
167 .sp .6 |
|
168 .RS 4n |
|
169 Contents under this directory are delivered as-is from the |
|
170 apache distribution and these files are not meant to be read by the server. |
|
171 .RE |
|
172 |
|
173 .sp |
|
174 .ne 2 |
|
175 .mk |
|
176 .na |
|
177 \fB\fB/etc/apache2/[version]/sample-conf.d/\fR\fR |
|
178 .ad |
|
179 .sp .6 |
|
180 .RS 4n |
|
181 Contains sample \fB\&.conf\fR files. These are |
|
182 not included in the main configuration file. To use the sample file, copy |
|
183 the file to \fBconf.d\fR directory and modify as per the need. |
|
184 .RE |
|
185 |
|
186 .sp |
|
187 .ne 2 |
|
188 .mk |
|
189 .na |
|
190 \fB\fB/usr/apache2/[version]/bin/\fR\fR |
|
191 .ad |
|
192 .sp .6 |
|
193 .RS 4n |
|
194 Contains the main httpd executable as well as other utility programs. |
|
195 .RE |
|
196 |
|
197 .sp |
|
198 .ne 2 |
|
199 .mk |
|
200 .na |
|
201 \fB\fB/usr/apache2/[version]/bin/envvars\fR\fR |
|
202 .ad |
|
203 .sp .6 |
|
204 .RS 4n |
|
205 Contains the default environment settings that the server uses at startup. |
|
206 .nf |
|
207 Editing this file is not recommended. |
|
208 .fi |
|
209 Instead, user should use /etc/apache2/[version]/envvars file. |
|
210 .RE |
|
211 |
|
212 .sp |
|
213 .ne 2 |
|
214 .mk |
|
215 .na |
|
216 \fB\fB/usr/apache2/[version]/manual/\fR\fR |
|
217 .ad |
|
218 .sp .6 |
|
219 .RS 4n |
|
220 Contains the Apache 2 manual in HTML format. |
|
221 .RE |
|
222 |
|
223 .sp |
|
224 .ne 2 |
|
225 .mk |
|
226 .na |
|
227 \fB\fB/usr/apache2/[version]/include/\fR\fR |
|
228 .ad |
|
229 .sp .6 |
|
230 .RS 4n |
|
231 Contains the Apache 2 header files, which are needed for building |
|
232 various optional server extensions with \fBapxs(8)\fR. |
|
233 .RE |
|
234 |
|
235 .sp |
|
236 .ne 2 |
|
237 .mk |
|
238 .na |
|
239 \fB\fB/usr/apache2/[version]/libexec/\fR\fR |
|
240 .ad |
|
241 .sp .6 |
|
242 .RS 4n |
|
243 Contains loadable modules (DSOs) supplied with the server. |
|
244 .RE |
|
245 |
|
246 .sp |
|
247 .ne 2 |
|
248 .mk |
|
249 .na |
|
250 \fB\fB/usr/apache2/[version]/man/\fR\fR |
|
251 .ad |
|
252 .sp .6 |
|
253 .RS 4n |
|
254 Contains man pages for the server, utility programs, and \fBmod_perl\fR. |
|
255 .sp |
|
256 Add this directory to your MANPATH to read the Apache 2 man pages. See |
|
257 Notes. |
|
258 .RE |
|
259 |
|
260 .sp |
|
261 .ne 2 |
|
262 .mk |
|
263 .na |
|
264 \fB\fB/var/apache2/[version]/cgi-bin/\fR\fR |
|
265 .ad |
|
266 .sp .6 |
|
267 .RS 4n |
|
268 Default location for the CGI scripts. |
|
269 .sp |
|
270 This can be changed by altering the \fBhttpd.conf\fR file |
|
271 and restarting the server. |
|
272 .RE |
|
273 |
|
274 .sp |
|
275 .ne 2 |
|
276 .mk |
|
277 .na |
|
278 \fB\fB/var/apache2/[version]/htdocs/\fR\fR |
|
279 .ad |
|
280 .sp .6 |
|
281 .RS 4n |
|
282 Default document root. |
|
283 .sp |
|
284 This can be changed by altering the \fBhttpd.conf\fR file |
|
285 and restarting the server. |
|
286 .RE |
|
287 |
|
288 .sp |
|
289 .ne 2 |
|
290 .mk |
|
291 .na |
|
292 \fB\fB/var/apache2/[version]/icons/\fR\fR |
|
293 .ad |
|
294 .sp .6 |
|
295 .RS 4n |
|
296 Icons used by the server. |
|
297 .sp |
|
298 This should not be changed. |
|
299 .RE |
|
300 |
|
301 .sp |
|
302 .ne 2 |
|
303 .mk |
|
304 .na |
|
305 \fB\fB/var/apache2/[version]/libexec/\fR\fR |
|
306 .ad |
|
307 .sp .6 |
|
308 .RS 4n |
|
309 Place holder for user Apache 2 modules. |
|
310 .sp |
|
311 Any modules which are added using \fBapxs(8)\fR are copied into this directory. |
|
312 .RE |
|
313 |
|
314 .sp |
|
315 .ne 2 |
|
316 .mk |
|
317 .na |
|
318 .RE |
|
319 |
|
320 .sp |
|
321 .ne 2 |
|
322 .mk |
|
323 .na |
|
324 \fB\fB/var/apache2/[version]/logs/\fR\fR |
|
325 .ad |
|
326 .sp .6 |
|
327 .RS 4n |
|
328 Contains server log files. |
|
329 .sp |
|
330 The formats, names, and locations of the files in this directory can |
|
331 be altered by various configuration directives in the \fBhttpd.conf\fR file. |
|
332 .RE |
|
333 |
|
334 .sp |
|
335 .ne 2 |
|
336 .mk |
|
337 .na |
|
338 \fB\fB/var/apache2/[version]/proxy/\fR\fR |
|
339 .ad |
|
340 .sp .6 |
|
341 .RS 4n |
|
342 Directory used to cache pages if the caching feature of \fBmod_proxy\fR is enabled in the \fBhttpd.conf\fR file. |
|
343 .sp |
|
344 The location of the cache can also be changed by changing the proxy |
|
345 configuration in the \fBhttpd.conf\fR file. |
|
346 .RE |
|
347 |
|
348 .sp |
|
349 .ne 2 |
|
350 .mk |
|
351 .na |
|
352 \fB\fB/usr/bin/\fR\fR |
|
353 .ad |
|
354 .sp .6 |
|
355 .RS 4na |
|
356 Contains pkg(5) version based mediated symbolic links to the various |
|
357 Apache 2 utility programs. |
|
358 .RE |
|
359 |
|
360 |
|
361 .SH EXAMPLES |
|
362 .LP |
|
363 \fBExample 1 \fRTo switch to worker MPM type |
|
364 .sp |
|
365 |
|
366 .in +2 |
|
367 .nf |
|
368 # \fBsvccfg -s apache24 setprop httpd/MPM=worker\fR |
|
369 # \fBsvcadm refresh apache24\fR |
|
370 # \fBsvcadm restart apache24\fR |
|
371 .fi |
|
372 .in -2 |
|
373 .sp |
|
374 |
|
375 .LP |
|
376 \fBExample 2 \fRCreate new SMF apache instance |
|
377 .sp |
|
378 .LP |
|
379 This expects that valid configuration exists in |
|
380 /var/myapache/httpd.conf and it has altered all relevant directives |
|
381 against default apache instance (e.g. PidFile, Listen, DocumentRoot, |
|
382 ErrorLog and CustomLog). |
|
383 .sp |
|
384 .in +2 |
|
385 .nf |
|
386 # \fBcp /lib/svc/manifest/network/http-apache24.xml my-apache24.xml\fR |
|
387 .sp |
|
388 Edit my-apache24.xml and rename instance name to my-apache24. |
|
389 |
|
390 # \fBsvccfg import my-apache24.xml\fR |
|
391 # \fBsvccfg -s my-apache24 setprop httpd/startup_options=\\("-f" "/var/myapache/httpd.conf"\\)\fR |
|
392 # \fBsvcadm refresh my-apache24\fR |
|
393 .fi |
|
394 .in -2 |
|
395 .sp |
|
396 |
|
397 .SH SEE ALSO |
|
398 .sp |
|
399 .LP |
|
400 \fBattributes(5)\fR, \fBhttpd(8)\fR, apachectl(8) |
|
401 .sp |
|
402 .LP |
|
403 http://httpd.apache.org/docs/ |
|
404 .SH NOTES |
|
405 .sp |
|
406 .LP |
|
407 In addition to the documentation and man pages included with Solaris, |
|
408 more information is available at http://httpd.apache.org/\&. |
|
409 .sp |
|
410 .LP |
|
411 The Apache 2 man pages are provided with the programming modules. To |
|
412 view the manual pages for the Apache 2 modules with the man command, add \fB/usr/apache2/[version]/man\fR to the MANPATH environment variable. |
|
413 See \fBman(1)\fR for more information. Running \fBcatman(1M)\fR on |
|
414 the Apache 2 manual pages is not supported. |