1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
Contents
========
Apache2 Configuration under Debian GNU/Linux
Files and Directories in /etc/apache2
Tools
Using mod_disk_cache
Documentation
Apache2 Configuration under Debian GNU/Linux
============================================
Debian's default Apache2 installation attempts to make adding and
removing modules, virtual hosts, and extra configuration directives as
flexible is possible, in order to make automating the changes and
administering the server as easy as possible.
Files and Directories in /etc/apache2:
-------------------------------------
apache2.conf
This is the main configuration file.
conf.d/
Files in this directory are included by this line in
apache2.conf:
# Include generic snippets of statements
Include /etc/apache2/conf.d
This is a good place to add additional configuration
directives.
httpd.conf
Empty file.
magic
Empty file.
mods-available/
This directory contains a series of .load and .conf files.
The .load files contain the Apache configuration directive
necessary to load the module in question. The respective
.conf files contain configuration directives necessary to
utilize the module in question.
mods-enabled/
To actually enable a module for Apache2, it is necessary to
create a symlink in this directory to the .load (and .conf, if
it exists) files associated with the module in
mods-available/. For example:
cgi.load -> /etc/apache2/mods-available/cgi.load
ports.conf
Configuration directives for which ports and IP addresses to
listen to.
sites-available/
Like mods-available/, except it contains configuration
directives for different virtual hosts that might be used with
apache2. Note that the hostname doesn't have to correspond
exactly with the filename. 'default' is the default host.
sites-enabled/
Similar in functionality to mods-enabled/, sites-enabled
contains symlinks to sites in sites-available/ that the
admnistrator wishes to enable.
Example:
dedasys -> /etc/apache2/sites-available/dedasys
The Include directive ignores files with names that
- do not begin with a letter or number
- contain a character that is neither letter nor number nor _-.
- contain .dpkg
Other files
-----------
For historical reasons, the pid file is in /var/run/apache2.pid and not in
/var/run/apache2/apache2.pid.
Tools
-----
a2enmod and a2dismod are available for enabling and disabling modules utilizing
the above configuration system.
a2ensite and a2dissite do essentially the same thing as the above tools, but
for sites rather than modules.
Using mod_disk_cache
====================
You need to enable caching in /etc/apache2/mods-enabled/disk_cache.conf . To
prevent the disk cache to grow indefinitely, you have to use htcacheclean from
the apache2-utils package. There is currently no mechanism in the Debian
package to start htcacheclean automatically. See the htcacheclean man page for
details.
Documentation
=============
The full apache 2 documentation can be found on the web at
http://httpd.apache.org/docs/2.2/
or, if you have installed the apache2-doc package, at
http://localhost/manual/
|