File: README.Debian

package info (click to toggle)
libapache-mod-security 1.8.7-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,132 kB
  • ctags: 664
  • sloc: ansic: 7,641; perl: 199; makefile: 59; sh: 44
file content (46 lines) | stat: -rw-r--r-- 1,450 bytes parent folder | download
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

To use testing scripts, do:

- libapache-mod-security for Apache 1.x:

# Add .pl as a cgi-script (uncomment example line)
#  AddHandler cgi-script .cgi .sh .pl
cat /etc/apache/httpd.conf | \
  sed 's/#AddHandler cgi-script .cgi .sh .pl/AddHandler cgi-script .cgi .sh .pl/' \
  > /etc/apache/httpd.conf.new && \
  mv -f /etc/apache/httpd.conf /etc/apache/httpd.conf.old && \
  mv -f /etc/apache/httpd.conf.new /etc/apache/httpd.conf

#Include httpd.conf-full
grep "/usr/share/doc/mod-security-common/examples/httpd.conf.example-full" \
  /etc/apache/httpd.conf > /dev/null || \
  echo "Include /usr/share/doc/mod-security-common/examples/httpd.conf.example-full" \
  >> /etc/apache/httpd.conf

# run "modules-config apache" and activate mod_security module
modules-config apache enable mod_security

# in /usr/share/mod-security/tests, do
cd /usr/share/mod-security/tests
./run-test.pl localhost *.test



- libapache2-mod-security for Apache 2.x:

# Enable mod_security module
cd /etc/apache2/mods-enabled && ln -fs ../mods-available/mod-security.load

# Enable cgi if disabled
cd /etc/apache2/mods-enabled && ln -fs ../mods-available/cgi.load

# Include httpd2.conf-full
echo 'Include /usr/share/doc/mod-security-common/examples/httpd2.conf.example-full' \
  > /etc/apache2/conf.d/mod-security.conf

# reload apache2
/etc/init.d/apache2 reload

# in /usr/share/mod-security/tests, do
cd /usr/share/mod-security/tests
./run-test.pl localhost *.test