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