This commit is contained in:
commit
692583743f
25
.gitattributes
vendored
Normal file
25
.gitattributes
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
## Specific LFS patterns
|
||||
Apache.xpm filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
Apache.xpm
Normal file
3
Apache.xpm
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:995d4deb92a87593dff872345780ca183d734af6d4d2af439827377adfc74d41
|
||||
size 9044
|
13
SUSE-NOTICE
Normal file
13
SUSE-NOTICE
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
The SuSE build of apache2 contains the following modifications:
|
||||
* assert HAVE_POLL during compilation (safety measure)
|
||||
* small fixes in apachectl to make it work with multiple MPMs, and
|
||||
use w3m alternatively to lynx
|
||||
* avoid error if compiled with openssl 0.9.6e
|
||||
* added patch to experimental caching module that fixes segfault for 'GET
|
||||
https://whatever.html HTTP/1.0' request on HTTP Port
|
||||
(/modules/experimental/cache_util.c)
|
||||
* RFC 2817 TLS upgrade backported from 2.1
|
||||
* fixed log_server_status to use Socket.pm and match our configuration
|
||||
* fixed check_forensic script (adjusted for GNU tools, use safe tmpdir)
|
||||
* http://www.apache.org/dist/httpd/patches/apply_to_2.0.52/util_ldap_cache_mgr.c.patch
|
49
a2enflag
Normal file
49
a2enflag
Normal file
@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2005 Peter Poeml <poeml@suse.de>. All Rights Reserved.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
|
||||
sysconf=/etc/sysconfig/apache2
|
||||
var=APACHE_SERVER_FLAGS
|
||||
PATH="$PATH:/usr/bin:/usr/sbin"
|
||||
|
||||
debug=true
|
||||
|
||||
function usage() {
|
||||
echo "$(basename $0): enable/disable a flag in $var in $sysconf"
|
||||
echo
|
||||
echo "usage: $(basename $0) [-d] flag"
|
||||
#echo " $(basename $0) -h runtests"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
action=enable
|
||||
case "$1" in
|
||||
-d) action=disable; shift;;
|
||||
-*) usage;;
|
||||
esac
|
||||
|
||||
case $(basename $0) in
|
||||
a2disflag) action=disable;;
|
||||
esac
|
||||
|
||||
flag=$1
|
||||
|
||||
|
||||
if [ $action = enable ]; then
|
||||
sysconf_addword $sysconf $var $flag
|
||||
exit $?
|
||||
else
|
||||
sysconf_addword -r $sysconf $var $flag
|
||||
exit $?
|
||||
fi
|
||||
|
62
a2enmod
Normal file
62
a2enmod
Normal file
@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2005 Peter Poeml <poeml@suse.de>. All Rights Reserved.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
|
||||
sysconf=/etc/sysconfig/apache2
|
||||
var=APACHE_MODULES
|
||||
PATH="$PATH:/usr/bin:/usr/sbin"
|
||||
|
||||
debug=true
|
||||
|
||||
function usage() {
|
||||
echo "$(basename $0): enable/disable an apache module in $var in $sysconf"
|
||||
echo
|
||||
echo "usage: $(basename $0) [-d] module"
|
||||
echo " $(basename $0) -l list modules"
|
||||
echo " $(basename $0) -q module query if module is installed"
|
||||
#echo " $(basename $0) -h runtests"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
action=enable
|
||||
case "$1" in
|
||||
-d) action=disable; shift;;
|
||||
-l) action=list; shift;;
|
||||
-q) action=query; shift;;
|
||||
-*) usage;;
|
||||
esac
|
||||
|
||||
case $(basename $0) in
|
||||
a2dismod) action=disable;;
|
||||
esac
|
||||
|
||||
mod=$1
|
||||
|
||||
|
||||
if [ $action = enable ]; then
|
||||
sysconf_addword $sysconf $var $mod
|
||||
exit $?
|
||||
elif [ $action = disable ]; then
|
||||
sysconf_addword -r $sysconf $var $mod
|
||||
exit $?
|
||||
elif [ $action = query ]; then
|
||||
if a2enmod -l | grep -q "\<$mod\>"; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
source $sysconf
|
||||
eval echo \$$var
|
||||
fi
|
||||
|
64
apache-20-22-upgrade
Normal file
64
apache-20-22-upgrade
Normal file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
# obsolete 2.0 modules -> 2.2 modules
|
||||
|
||||
echo 'looking for old 2.0 modules to be renamed...'
|
||||
|
||||
if a2enmod -q auth; then
|
||||
echo 'auth -> auth_basic authn_file'
|
||||
|
||||
a2dismod auth
|
||||
a2enmod auth_basic
|
||||
a2enmod authn_file
|
||||
a2enmod authz_groupfile
|
||||
a2enmod authz_default
|
||||
a2enmod authz_user
|
||||
|
||||
cat <<-EOF
|
||||
|
||||
|
||||
!!!ATTENTION!!!
|
||||
|
||||
If you use basic authentication, you will need to update your
|
||||
configuration. Typically, you need to add
|
||||
AuthBasicProvider file
|
||||
(example for file-based authentication) below "AuthType Basic".
|
||||
|
||||
!!!ATTENTION!!!
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
if a2enmod -q access; then
|
||||
echo 'access -> authz_host'
|
||||
a2dismod access
|
||||
a2enmod authz_host
|
||||
fi
|
||||
|
||||
if a2enmod -q auth_dbm; then
|
||||
echo 'auth_dbm -> authn_dbm'
|
||||
a2dismod auth_dbm
|
||||
a2enmod authn_dbm
|
||||
fi
|
||||
|
||||
if a2enmod -q imap; then
|
||||
echo 'imap -> imagemap'
|
||||
a2dismod imap
|
||||
a2enmod imagemap
|
||||
fi
|
||||
|
||||
if a2enmod -q image_map; then
|
||||
echo 'image_map -> imagemap'
|
||||
a2dismod image_map
|
||||
a2enmod imagemap
|
||||
fi
|
||||
|
||||
if a2enmod -q auth_ldap; then
|
||||
echo 'auth_ldap -> mod_authnz_ldap'
|
||||
a2dismod auth_ldap
|
||||
a2enmod mod_authnz_ldap
|
||||
fi
|
||||
|
||||
echo 'Done.'
|
3
apache-ssl-stuff.tar.bz2
Normal file
3
apache-ssl-stuff.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a4c919f1ebd8ce788c10749b28a259302843c0061d56e199c2cb7a929c30d6ed
|
||||
size 82910
|
114
apache2-README
Normal file
114
apache2-README
Normal file
@ -0,0 +1,114 @@
|
||||
README.SuSE for Apache 2
|
||||
|
||||
|
||||
For The Impatient
|
||||
=================
|
||||
|
||||
o There are several MPM packages (MPM = multiprocessing module, which implements
|
||||
the threads/processes model). The MPM packages contain the actual apache binary.
|
||||
At least one MPM package must be installed.
|
||||
|
||||
o The apache v1 and v2 packages can be installed and run side by side :)
|
||||
|
||||
o Some commands have a "2" suffix, and are thus easily confused with Apache 1
|
||||
commands -- if you have an old apache (1.3) installation around.
|
||||
|
||||
o Edit /etc/sysconfig/apache2 to configure the list of modules to load, and other things.
|
||||
It is no longer required to run SuSEconfig after such changes. (In fact, the
|
||||
SuSEconfig.apache2 does no longer exist.)
|
||||
|
||||
|
||||
o For building apache modules, there are 4 apxs commands (all come with the
|
||||
apache2-devel package):
|
||||
apxs2 builds a common module for all MPMs and installs to /usr/lib/apache2
|
||||
apxs2-prefork builds for prefork and installs to /usr/lib/apache2-prefork
|
||||
apxs2-worker builds for worker and installs to /usr/lib/apache2-worker
|
||||
|
||||
If you build apache modules, the configure script might not find apxs, and
|
||||
you'll need an option like --with-apxs=apxs2[-worker, ...], or of course you can set
|
||||
a symlink to apxs2.
|
||||
|
||||
o The Apache Runtime (APR) is in the "libapr0" package (this package was named "apr"
|
||||
in the past (8.1))
|
||||
|
||||
|
||||
Choosing the right MPM for your application
|
||||
===========================================
|
||||
|
||||
apache2-prefork is implemented with a prefork regime, while
|
||||
apache2-worker uses a hybrid threaded/preforked model.
|
||||
|
||||
Which one to use? The short answer is:
|
||||
- if in doubt, simply use prefork
|
||||
- use prefork if you use mod_php4
|
||||
- use worker if you need maximal performance with (possibly) less resources
|
||||
(smaller memory footprint of threade compared to the same number as processes)
|
||||
|
||||
The following nice article has a more in depth answer:
|
||||
http://www.onlamp.com/pub/a/apache/2004/06/17/apacheckbk.html
|
||||
|
||||
See
|
||||
http://httpd.apache.org/docs-2.2/mpm.html and
|
||||
http://httpd.apache.org/docs-2.2/misc/perf-tuning.html#compiletime
|
||||
for more technical details.
|
||||
|
||||
In general, using a threaded MPM (worker) requires that all libraries that are
|
||||
loaded into apache (and libraries loaded by them in turn) be threadsafe as well.
|
||||
See
|
||||
http://httpd.apache.org/docs-2.2/developer/thread_safety.html for a status on
|
||||
some libraries.
|
||||
|
||||
|
||||
Upgrading from apache 1.3
|
||||
=========================
|
||||
|
||||
For a smooth transition from apache 1.3, apache 2 is installable alongside apache
|
||||
1.3. There are a few modules for apache 1 that have not been ported or enough
|
||||
tested for apache 2, but most important modules are available by now.
|
||||
|
||||
The mechanism of specifying modules to load into the server has been cleaned up
|
||||
so a reasonable default set of modules is loaded. (It is not useful to load all
|
||||
available modules by default, it would make the server quite big and slow. This
|
||||
is important given as the number of modules in the apache base distribution is
|
||||
rising and rising (about 50 at this time).
|
||||
|
||||
In previous apache packages (1.3), modules were activated by setting a
|
||||
APACHE_MOD_XYZ variable to "yes" and running SuSEconfig.
|
||||
Nowadays, modules are activated by adding them to a the APACHE_MODULES
|
||||
variable in /etc/sysconfig/apache2, and simply restarting apache.
|
||||
|
||||
|
||||
Building modules for apache 2
|
||||
=============================
|
||||
|
||||
Therefore, the different MPMs will be needed and a mechanism to build
|
||||
the modules spesific to them. This can now be done with the apxs2,
|
||||
apxs2-worker or apxs2-prefork script.
|
||||
|
||||
For a module's configure script, you would typically use
|
||||
--which-apxs=/usr/sbin/apxs2-prefork
|
||||
|
||||
In RPM spec files, you can use
|
||||
%define apxs apxs2
|
||||
%define apache_libexecdir %(%{apxs} -q libexecdir)
|
||||
to build modules, or use apxs2-prefork (for instance) to build a module
|
||||
specifically for the prefork MPM.
|
||||
|
||||
To further the example, apxs2-prefork will install a module below
|
||||
/usr/lib/apache2-prefork/, while "apxs2" will install it below
|
||||
/usr/lib/apache2/.
|
||||
|
||||
-a adds the module to APACHE_MODULES in /etc/sysconfig/apache2, which in turn
|
||||
takes care of loading the module.
|
||||
|
||||
Thus, usually you will only have to call
|
||||
apxs2 -cia my_module.c
|
||||
and all is fine.
|
||||
|
||||
|
||||
--
|
||||
Suggestions or bug reports (via http://bugzilla.novell.com/) are most
|
||||
welcome.
|
||||
|
||||
|
||||
Mar 14 2005, Peter Poeml
|
101
apache2-README.QUICKSTART
Normal file
101
apache2-README.QUICKSTART
Normal file
@ -0,0 +1,101 @@
|
||||
|
||||
QUICKSTART -- How to get your server up and running as fast as possible
|
||||
|
||||
o General machine setup:
|
||||
- configure your network
|
||||
- make sure that all components are current, by running YaST Online Update
|
||||
regularly
|
||||
|
||||
o synchronise time (parts of the HTTP protocol depend on correct time):
|
||||
- configure machine as NTP client, either with the YaST configuration module or
|
||||
by editing /etc/ntp.conf (just put a server name into it) and starting
|
||||
"rcxntpd start", and running "chkconfig -a xntpd"
|
||||
|
||||
o if you run a firewall, make sure to allow access through port 80 if the server
|
||||
should be reachable from other machines.
|
||||
|
||||
o start the server, and configure it to automatically start at boot time:
|
||||
- rcapache2 start
|
||||
- chkconfig -a apache2
|
||||
|
||||
o add web pages:
|
||||
- the DocumentRoot is at /srv/www/htdocs
|
||||
- if you add documents somewhere else and link to them with e.g.
|
||||
Alias someplace "/path/to/someplace"
|
||||
make sure to also use <Directory /path/to/someplace> ... </Directory>
|
||||
to define access permissions and options for that directory, since
|
||||
(starting with SuSE Linux 9.0) access to the entire filesystem is blocked
|
||||
by default. See http://httpd.apache.org/docs-2.2/mod/core.html#directory
|
||||
|
||||
o go through /etc/sysconfig/apache2:
|
||||
- check loaded modules (APACHE_MODULES="...").
|
||||
- add "php4", "perl", or other needed modules to APACHE_MODULES al gusto.
|
||||
- modules can be enabled/disabled in a simple (Debian-compatible ;) way from
|
||||
the command line like this:
|
||||
a2enmod php5
|
||||
a2dismod php5
|
||||
- there is also a command a2enflag, to change APACHE_SERVER_FLAGS
|
||||
- restart the server ('rcapache2 restart')
|
||||
|
||||
o where to add your own configuration:
|
||||
- add e.g. /etc/apache2/httpd.conf.local and change APACHE_CONF_INCLUDE_FILES
|
||||
in /etc/sysconfig/apache2, e.g. APACHE_CONF_INCLUDE_FILES="httpd.conf.local"
|
||||
- to understand the hierarchy and layout of all include files, read the
|
||||
comments at the top of httpd.conf
|
||||
- if you strongly prefer the old, single, 40K, monolithic configuration file,
|
||||
it's there! Just use it:
|
||||
mv /etc/apache2/httpd.conf /etc/apache2/httpd.conf.dist
|
||||
cp /usr/share/doc/packages/apache2/httpd-std.conf-prefork /etc/apache2/httpd.conf
|
||||
rcapache2 restart
|
||||
|
||||
o add virtual hosts:
|
||||
- edit /etc/apache2/listen.conf. It is a suitable place to add
|
||||
NameVirtualHost directives.
|
||||
- copy the commented template /etc/apache2/vhosts.d/vhost.template to
|
||||
/etc/apache2/vhosts.d/yourhost.conf
|
||||
(note, it must end in .conf to be automatically read)
|
||||
- edit /etc/apache2/vhosts.d/yourhost.conf to suit your needs
|
||||
- alternative approach: simply append the NameVirtualHost directive and the
|
||||
<VirtualHost> container to your local configuration (httpd.conf.local --
|
||||
see above)
|
||||
- if in doubt about how apache interprets your vhost setup, always use
|
||||
httpd2 -S. If SSL is involved you will need to run httpd2 -S -DSSL instead --
|
||||
likewise for other needed defines.
|
||||
- the "default" server, which responds to requests not handled by other
|
||||
vhosts, is always the one which is defined first. If you want a dedicated
|
||||
"default" server for such requests, you need to put it first in the configuration.
|
||||
If the configuration is in multiple files, like /etc/apache2/vhosts.d/*.conf, then
|
||||
simply name the file _default.conf, or e.g. _192.168.0.1.conf if you do it per IP
|
||||
address.
|
||||
|
||||
o TROUBLESHOOTING -- if anything does not work:
|
||||
- fire up "tail -F /var/log/apache2/*_log &" in a root shell
|
||||
- reproduce what is not working (starting apache, doing client requests,
|
||||
or whatever), and see how it is reflected in the logs
|
||||
- read http://www.suse.com/~poeml/apache-faq.html
|
||||
- make use of http://bugzilla.novell.com if you suspect a bug
|
||||
|
||||
o for all configuration questions, consult
|
||||
http://localhost/manual (if the apache2-doc package is installed), or
|
||||
http://httpd.apache.org/docs-2.2/ (the online version)
|
||||
- read the documentation under /usr/share/doc/packages/apache2/ (where you
|
||||
will also find example configuration files)
|
||||
|
||||
o building 3rd party modules:
|
||||
- install apache2-devel (and of course gcc as well as other needed
|
||||
development tools)
|
||||
- use
|
||||
apxs2 -- to build a module for all MPM types, or
|
||||
apxs2-prefork -- to build a module for the Prefork MPM, or
|
||||
apxs2-worker -- to build a module for the Worker MPM
|
||||
(see man 8 apxs2). In most cases you can just use "apxs2", the most
|
||||
notably exception being mod_php4. Using apxs2-prefork then will prevent
|
||||
you from accidentally trying to use the module with the Worker MPM.
|
||||
Typical example: apxs2 -c -i -a mod_foo.c
|
||||
-c compiles
|
||||
-i installs the module in the right place
|
||||
-a activates the module by running 'a2enmod mod_foo'
|
||||
- if the module's build system does not allow to use apxs, use at least
|
||||
CFLAGS=$(apxs2 -q CFLAGS)
|
||||
to determine the right compiler flags for your apache installation.
|
||||
|
59
apache2-README.QUICKSTART.SSL
Normal file
59
apache2-README.QUICKSTART.SSL
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
QUICKSTART.SSL -- How to get your SSL server up and running as fast as possible
|
||||
|
||||
You need to have read the README.QUICKSTART before going on with
|
||||
this one!
|
||||
|
||||
|
||||
o make sure that apache starts with mod_ssl loaded
|
||||
- a2enmod ssl
|
||||
It adapts /etc/sysconfig/apache2:APACHE_MODULES.
|
||||
|
||||
o make sure that the SSL configuration is active
|
||||
- a2enflag SSL
|
||||
It adapts /etc/sysconfig/apache2:APACHE_SERVER_FLAGS.
|
||||
- the reason why the flag SSL is also needed is because it's enclosed in
|
||||
<IfDefine> statements. This way it can be dormant until the necessary
|
||||
prerequisite are present (keys) and you want to use it. In addition, it
|
||||
can be useful to be able to start apache unattended at boot time even if
|
||||
you use encrypted keys that need a passphrase otherwise.
|
||||
|
||||
o for a real SSL setup, I recommend TinyCA to create and manage a real ssl setup.
|
||||
It is available on SUSE Linux as package "tinyca2".
|
||||
Also, please refer to the mod_ssl documentation.
|
||||
|
||||
o The following steps will create _dummy_ keys in a very simple way:
|
||||
- run /usr/bin/gensslcert
|
||||
- it will (over)write /etc/apache2/ssl.crt/ca.crt
|
||||
/etc/apache2/ssl.key/server.key
|
||||
/etc/apache2/ssl.crt/server.crt
|
||||
/etc/apache2/ssl.csr/server.csr
|
||||
- a copy of ca.crt will be installed as /srv/www/htdocs/CA.crt for download.
|
||||
- cp vhosts.d/vhost-ssl.template vhosts.d/vhost-ssl.conf
|
||||
and adapt vhosts.d/vhost-ssl.conf al gusto
|
||||
(note it must end in .conf to be read automatically)
|
||||
|
||||
o to check your vhost setup, use "httpd2 -S -DSSL"
|
||||
|
||||
o for all configuration questions, consult
|
||||
http://localhost/manual (if the apache2-doc package is installed), or
|
||||
http://httpd.apache.org/docs-2.2/ (the online version)
|
||||
- read the documentation under /usr/share/doc/packages/apache2/ (where you
|
||||
will also find example configuration files)
|
||||
|
||||
o TROUBLESHOOTING -- if anything does not work:
|
||||
- fire up "tail -F /var/log/apache2/*_log &" in a root shell
|
||||
- reproduce what is not working (starting apache, doing client requests,
|
||||
or whatever), and see how it is reflected in the logs
|
||||
- read http://www.suse.com/~poeml/apache-faq.html
|
||||
- make use of http://bugzilla.novell.com if you suspect a bug
|
||||
|
||||
o common symptom:
|
||||
- server logs this: [Thu Aug 28 21:07:39 2003] [error] [client 192.168.0.180] Invalid method in request j
|
||||
- client shows this: SSL error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
|
||||
cause: client speaks HTTPS, server speaks HTTP. If that happens to be port
|
||||
443, it means that the server is listening on the port but not with
|
||||
SSL. If it was the other way round (client speaks HTTP, server
|
||||
speaks HTTPS), the server would log 400 and the client show an error
|
||||
400 (HTTP_BAD_REQUEST) page.
|
||||
|
75
apache2-README.QUICKSTART.WebDAV
Normal file
75
apache2-README.QUICKSTART.WebDAV
Normal file
@ -0,0 +1,75 @@
|
||||
|
||||
#
|
||||
# Example (using Digest Authentication)
|
||||
#
|
||||
|
||||
# enable needed apache modules:
|
||||
/usr/sbin/a2enmod dav
|
||||
/usr/sbin/a2enmod dav_fs
|
||||
|
||||
# Define directory to be accesed:
|
||||
davdir="editme"
|
||||
# Define a location where the credentials are stored:
|
||||
acldir=ACL
|
||||
auth_realm=$davdir
|
||||
|
||||
cd /srv/www
|
||||
|
||||
# create a directory for WebDAV access:
|
||||
mkdir $davdir
|
||||
chmod 770 $davdir
|
||||
chown root:www $davdir
|
||||
|
||||
# create the directory for the credentials:
|
||||
mkdir $acldir
|
||||
chmod 750 $acldir
|
||||
chown root:www $acldir
|
||||
|
||||
# create credentials file:
|
||||
touch $acldir/$davdir
|
||||
chown root:www $acldir/$davdir
|
||||
chmod 640 $acldir/$davdir
|
||||
|
||||
# set up a user accound
|
||||
htdigest $acldir/$davdir $auth_realm ${user:-user1}
|
||||
|
||||
|
||||
cat <<EOF
|
||||
#
|
||||
# Put this into /etc/apache2/conf.d/$davdir.conf:
|
||||
#
|
||||
|
||||
EOF
|
||||
|
||||
cat <<EOF
|
||||
|
||||
# This directive is always needed, if you use WebDAV.
|
||||
# see http://httpd.apache.org/docs-2.2/mod/mod_dav_fs.html#davlockdb
|
||||
<IfModule mod_dav_fs.c>
|
||||
DavLockDB /var/lib/apache2/DAVLock
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_dav.c>
|
||||
<IfModule mod_dav_fs.c>
|
||||
Alias /$davdir /srv/www/$davdir
|
||||
<Location /$davdir>
|
||||
DAV On
|
||||
#ForceType text/plain
|
||||
|
||||
Order Deny,Allow
|
||||
Deny from all
|
||||
|
||||
AuthType Digest
|
||||
AuthName "private area"
|
||||
|
||||
AuthDigestFile /srv/www/ACL/$davdir
|
||||
AuthDigestDomain /$davdir/
|
||||
AuthName $auth_realm
|
||||
|
||||
Require valid-user
|
||||
Satisfy Any
|
||||
</Location>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
EOF
|
22
apache2-check_forensic
Normal file
22
apache2-check_forensic
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check_forensic <forensic log file>
|
||||
|
||||
# check the forensic log for requests that did not complete
|
||||
# output the request log for each one
|
||||
|
||||
# This script is based on Ben Laurie's check_forensic, but is adjusted for GNU
|
||||
# tools (as used on Linux) and it works in a safe tmpdir directory. <poeml@suse.de>
|
||||
# todo: rewrite in a form that allows running on more operating systems.
|
||||
|
||||
F=${1:?give filename as argument. cannot read from stdin.}
|
||||
|
||||
tmpprefix=${TMPDIR:-/tmp}/check_forensic.XXXXXX
|
||||
tdir=$(mktemp -d $tmpprefix); test $? = 0 || { echo >&2 Could not create tmpdir. Exiting; exit 1; }
|
||||
|
||||
cut -f 1 -d '|' $F > $tdir/fc-all.$$
|
||||
grep ^+ < $tdir/fc-all.$$ | cut -c2- | sort > $tdir/fc-in.$$
|
||||
grep -- ^- < $tdir/fc-all.$$ | cut -c2- | sort > $tdir/fc-out.$$
|
||||
join -v 1 $tdir/fc-in.$$ $tdir/fc-out.$$ | xargs -ixx egrep "^\\+xx" $F
|
||||
rm $tdir/fc-all.$$ $tdir/fc-in.$$ $tdir/fc-out.$$
|
||||
rmdir $tdir
|
106
apache2-default-server.conf
Normal file
106
apache2-default-server.conf
Normal file
@ -0,0 +1,106 @@
|
||||
#
|
||||
# Global configuration that will be applicable for all virtual hosts, unless
|
||||
# deleted here, or overriden elswhere.
|
||||
#
|
||||
|
||||
DocumentRoot "/srv/www/htdocs"
|
||||
|
||||
#
|
||||
# Configure the DocumentRoot
|
||||
#
|
||||
<Directory "/srv/www/htdocs">
|
||||
# Possible values for the Options directive are "None", "All",
|
||||
# or any combination of:
|
||||
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
|
||||
#
|
||||
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
||||
# doesn't give it to you.
|
||||
#
|
||||
# The Options directive is both complicated and important. Please see
|
||||
# http://httpd.apache.org/docs-2.2/mod/core.html#options
|
||||
# for more information.
|
||||
Options None
|
||||
# AllowOverride controls what directives may be placed in .htaccess files.
|
||||
# It can be "All", "None", or any combination of the keywords:
|
||||
# Options FileInfo AuthConfig Limit
|
||||
AllowOverride None
|
||||
# Controls who can get stuff from this server.
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
# Aliases: aliases can be added as needed (with no limit). The format is
|
||||
# Alias fakename realname
|
||||
#
|
||||
# Note that if you include a trailing / on fakename then the server will
|
||||
# require it to be present in the URL. So "/icons" isn't aliased in this
|
||||
# example, only "/icons/". If the fakename is slash-terminated, then the
|
||||
# realname must also be slash terminated, and if the fakename omits the
|
||||
# trailing slash, the realname must also omit it.
|
||||
#
|
||||
# We include the /icons/ alias for FancyIndexed directory listings. If you
|
||||
# do not use FancyIndexing, you may comment this out.
|
||||
#
|
||||
Alias /icons/ "/usr/share/apache2/icons/"
|
||||
|
||||
<Directory "/usr/share/apache2/icons">
|
||||
Options Indexes MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
# ScriptAlias: This controls which directories contain server scripts.
|
||||
# ScriptAliases are essentially the same as Aliases, except that
|
||||
# documents in the realname directory are treated as applications and
|
||||
# run by the server when requested rather than as documents sent to the client.
|
||||
# The same rules about trailing "/" apply to ScriptAlias directives as to
|
||||
# Alias.
|
||||
#
|
||||
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
|
||||
|
||||
# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
|
||||
# CGI directory exists, if you have that configured.
|
||||
#
|
||||
<Directory "/srv/www/cgi-bin">
|
||||
AllowOverride None
|
||||
Options +ExecCGI -Includes
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
# UserDir: The name of the directory that is appended onto a user's home
|
||||
# directory if a ~user request is received.
|
||||
#
|
||||
# To disable it, simply remove userdir from the list of modules in APACHE_MODULES
|
||||
# in /etc/sysconfig/apache2.
|
||||
#
|
||||
<IfModule mod_userdir.c>
|
||||
# Note that the name of the user directory ("public_html") cannot simply be
|
||||
# changed here, since it is a compile time setting. The apache package
|
||||
# would have to be rebuilt. You could work around by deleting
|
||||
# /usr/sbin/suexec, but then all scripts from the directories would be
|
||||
# executed with the UID of the webserver.
|
||||
UserDir public_html
|
||||
# The actual configuration of the directory is in
|
||||
# /etc/apache2/mod_userdir.conf.
|
||||
Include /etc/apache2/mod_userdir.conf
|
||||
# You can, however, change the ~ if you find it awkward, by mapping e.g.
|
||||
# http://www.example.com/users/karl-heinz/ --> /home/karl-heinz/public_html/
|
||||
#AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2
|
||||
</IfModule>
|
||||
|
||||
|
||||
# Include all *.conf files from /etc/apache2/conf.d/.
|
||||
#
|
||||
# This is mostly meant as a place for other RPM packages to drop in their
|
||||
# configuration snippet.
|
||||
#
|
||||
# You can comment this out here if you want those bits include only in a
|
||||
# certain virtual host, but not here.
|
||||
#
|
||||
Include /etc/apache2/conf.d/*.conf
|
||||
|
||||
# The manual... if it is installed ('?' means it won't complain)
|
||||
Include /etc/apache2/conf.d/apache2-manual?conf
|
||||
|
68
apache2-errors.conf
Normal file
68
apache2-errors.conf
Normal file
@ -0,0 +1,68 @@
|
||||
|
||||
#
|
||||
# Customizable error responses come in three flavors:
|
||||
# 1) plain text 2) local redirects 3) external redirects
|
||||
#
|
||||
# Some examples:
|
||||
#ErrorDocument 500 "The server made a boo boo."
|
||||
#ErrorDocument 404 /missing.html
|
||||
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
|
||||
#ErrorDocument 402 http://www.example.com/subscription_info.html
|
||||
#
|
||||
|
||||
#
|
||||
# Putting this all together, we can internationalize error responses.
|
||||
#
|
||||
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
|
||||
# our collection of by-error message multi-language collections. We use
|
||||
# includes to substitute the appropriate text.
|
||||
#
|
||||
# You can modify the messages' appearance without changing any of the
|
||||
# default HTTP_<error>.html.var files by adding the line:
|
||||
#
|
||||
# Alias /error/include/ "/your/include/path/"
|
||||
#
|
||||
# which allows you to create your own set of files by starting with the
|
||||
# /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
|
||||
# even on a per-VirtualHost basis. The default include files will display
|
||||
# your Apache version number and your ServerAdmin email address regardless
|
||||
# of the setting of ServerSignature.
|
||||
#
|
||||
# The internationalized error documents require mod_alias, mod_include
|
||||
# and mod_negotiation. To activate them, uncomment the following 30 lines.
|
||||
|
||||
Alias /error/ "/usr/share/apache2/error/"
|
||||
|
||||
<IfModule mod_negotiation.c>
|
||||
<IfModule mod_include.c>
|
||||
<Directory "/usr/share/apache2/error">
|
||||
AllowOverride None
|
||||
Options IncludesNoExec
|
||||
AddOutputFilter Includes html
|
||||
AddHandler type-map var
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
|
||||
ForceLanguagePriority Prefer Fallback
|
||||
</Directory>
|
||||
|
||||
ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
|
||||
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
|
||||
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
|
||||
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
|
||||
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
|
||||
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
|
||||
ErrorDocument 410 /error/HTTP_GONE.html.var
|
||||
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
|
||||
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
|
||||
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
|
||||
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
|
||||
ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
|
||||
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
|
||||
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
|
||||
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
|
||||
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
|
||||
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
212
apache2-httpd.conf
Normal file
212
apache2-httpd.conf
Normal file
@ -0,0 +1,212 @@
|
||||
#
|
||||
# /etc/apache2/httpd.conf
|
||||
#
|
||||
# This is the main Apache server configuration file. It contains the
|
||||
# configuration directives that give the server its instructions.
|
||||
# See <URL:http://httpd.apache.org/docs-2.2/> for detailed information about
|
||||
# the directives.
|
||||
|
||||
# Based upon the default apache configuration file that ships with apache,
|
||||
# which is based upon the NCSA server configuration files originally by Rob
|
||||
# McCool. This file was knocked together by Peter Poeml <poeml+apache@suse.de>.
|
||||
|
||||
# If possible, avoid changes to this file. It does mainly contain Include
|
||||
# statements and global settings that can/should be overridden in the
|
||||
# configuration of your virtual hosts.
|
||||
|
||||
# Quickstart guide:
|
||||
# /usr/share/doc/packages/apache2/README.QUICKSTART
|
||||
|
||||
|
||||
# Overview of include files, chronologically:
|
||||
#
|
||||
# httpd.conf
|
||||
# |
|
||||
# |-- uid.conf . . . . . . . . . . . . . . UserID/GroupID to run under
|
||||
# |-- server-tuning.conf . . . . . . . . . sizing of the server (how many processes to start, ...)
|
||||
# |-- sysconfig.d/loadmodule.conf . . . . . [*] load these modules
|
||||
# |-- listen.conf . . . . . . . . . . . . . IP adresses / ports to listen on
|
||||
# |-- mod_log_config.conf . . . . . . . . . define logging formats
|
||||
# |-- sysconfig.d/global.conf . . . . . . . [*] server-wide general settings
|
||||
# |-- mod_status.conf . . . . . . . . . . . restrict access to mod_status (server monitoring)
|
||||
# |-- mod_info.conf . . . . . . . . . . . . restrict access to mod_info
|
||||
# |-- mod_usertrack.conf . . . . . . . . . defaults for cookie-based user tracking
|
||||
# |-- mod_autoindex-defaults.conf . . . . . defaults for displaying of server-generated directory listings
|
||||
# |-- mod_mime-defaults.conf . . . . . . . defaults for mod_mime configuration
|
||||
# |-- errors.conf . . . . . . . . . . . . . customize error responses
|
||||
# |-- ssl-global.conf . . . . . . . . . . . SSL conf that applies to default server _and all_ virtual hosts
|
||||
# |
|
||||
# |-- default-server.conf . . . . . . . . . set up the default server that replies to non-virtual-host requests
|
||||
# | |--mod_userdir.conf . . . . . . . . enable UserDir (if mod_userdir is loaded)
|
||||
# | `--conf.d/apache2-manual?conf . . . add the docs ('?' = if installed)
|
||||
# |
|
||||
# |-- sysconfig.d/include.conf . . . . . . [*] your include files
|
||||
# | (for each file to be included here, put its name
|
||||
# | into APACHE_INCLUDE_* in /etc/sysconfig/apache2)
|
||||
# |
|
||||
# `-- vhosts.d/ . . . . . . . . . . . . . . for each virtual host, place one file here
|
||||
# `-- *.conf . . . . . . . . . . . . . (*.conf is automatically included)
|
||||
#
|
||||
#
|
||||
# Files marked [*] are created from sysconfig upon server restart: instead of
|
||||
# these files, you edit /etc/sysconfig/apache2
|
||||
|
||||
|
||||
|
||||
# Filesystem layout:
|
||||
#
|
||||
# /etc/apache2/
|
||||
# |-- charset.conv . . . . . . . . . . . . for mod_auth_ldap
|
||||
# |-- conf.d/
|
||||
# | |-- apache2-manual.conf . . . . . . . conf that comes with apache2-doc
|
||||
# | |-- mod_php4.conf . . . . . . . . . . (example) conf that comes with apache2-mod_php4
|
||||
# | `-- ... . . . . . . . . . . . . . . . other configuration added by packages
|
||||
# |-- default-server.conf
|
||||
# |-- errors.conf
|
||||
# |-- httpd.conf . . . . . . . . . . . . . top level configuration file
|
||||
# |-- listen.conf
|
||||
# |-- magic
|
||||
# |-- mime.types -> ../mime.types
|
||||
# |-- mod_autoindex-defaults.conf
|
||||
# |-- mod_info.conf
|
||||
# |-- mod_log_config.conf
|
||||
# |-- mod_mime-defaults.conf
|
||||
# |-- mod_perl-startup.pl
|
||||
# |-- mod_status.conf
|
||||
# |-- mod_userdir.conf
|
||||
# |-- mod_usertrack.conf
|
||||
# |-- server-tuning.conf
|
||||
# |-- ssl-global.conf
|
||||
# |-- ssl.crl/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificate Revocation Lists (CRL)
|
||||
# |-- ssl.crt/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificates
|
||||
# |-- ssl.csr/ . . . . . . . . . . . . . . PEM-encoded X.509 Certificate Signing Requests
|
||||
# |-- ssl.key/ . . . . . . . . . . . . . . PEM-encoded RSA Private Keys
|
||||
# |-- ssl.prm/ . . . . . . . . . . . . . . public DSA Parameter Files
|
||||
# |-- sysconfig.d/ . . . . . . . . . . . . files that are created from /etc/sysconfig/apache2
|
||||
# | |-- global.conf
|
||||
# | |-- include.conf
|
||||
# | `-- loadmodule.conf
|
||||
# |-- uid.conf
|
||||
# `-- vhosts.d/ . . . . . . . . . . . . . . put your virtual host configuration (*.conf) here
|
||||
# |-- vhost-ssl.template
|
||||
# `-- vhost.template
|
||||
|
||||
|
||||
|
||||
### Global Environment ######################################################
|
||||
#
|
||||
# The directives in this section affect the overall operation of Apache,
|
||||
# such as the number of concurrent requests.
|
||||
|
||||
# run under this user/group id
|
||||
Include /etc/apache2/uid.conf
|
||||
|
||||
# - how many server processes to start (server pool regulation)
|
||||
# - usage of KeepAlive
|
||||
Include /etc/apache2/server-tuning.conf
|
||||
|
||||
# ErrorLog: The location of the error log file.
|
||||
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
||||
# container, error messages relating to that virtual host will be
|
||||
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||
# container, that host's errors will be logged there and not here.
|
||||
ErrorLog /var/log/apache2/error_log
|
||||
|
||||
# generated from APACHE_MODULES in /etc/sysconfig/apache2
|
||||
Include /etc/apache2/sysconfig.d/loadmodule.conf
|
||||
|
||||
# IP addresses / ports to listen on
|
||||
Include /etc/apache2/listen.conf
|
||||
|
||||
# predefined logging formats
|
||||
Include /etc/apache2/mod_log_config.conf
|
||||
|
||||
# generated from global settings in /etc/sysconfig/apache2
|
||||
Include /etc/apache2/sysconfig.d/global.conf
|
||||
|
||||
# optional mod_status, mod_info
|
||||
Include /etc/apache2/mod_status.conf
|
||||
Include /etc/apache2/mod_info.conf
|
||||
|
||||
# optional cookie-based user tracking
|
||||
# read the documentation before using it!!
|
||||
Include /etc/apache2/mod_usertrack.conf
|
||||
|
||||
# configuration of server-generated directory listings
|
||||
Include /etc/apache2/mod_autoindex-defaults.conf
|
||||
|
||||
# associate MIME types with filename extensions
|
||||
TypesConfig /etc/apache2/mime.types
|
||||
DefaultType text/plain
|
||||
Include /etc/apache2/mod_mime-defaults.conf
|
||||
|
||||
# set up (customizable) error responses
|
||||
Include /etc/apache2/errors.conf
|
||||
|
||||
# global (server-wide) SSL configuration, that is not specific to
|
||||
# any virtual host
|
||||
Include /etc/apache2/ssl-global.conf
|
||||
|
||||
# forbid access to the entire filesystem by default
|
||||
<Directory />
|
||||
Options None
|
||||
AllowOverride None
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</Directory>
|
||||
|
||||
# use .htaccess files for overriding,
|
||||
AccessFileName .htaccess
|
||||
# and never show them
|
||||
<Files ~ "^\.ht">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
# List of resources to look for when the client requests a directory
|
||||
DirectoryIndex index.html index.html.var
|
||||
|
||||
### 'Main' server configuration #############################################
|
||||
#
|
||||
# The directives in this section set up the values used by the 'main'
|
||||
# server, which responds to any requests that aren't handled by a
|
||||
# <VirtualHost> definition. These values also provide defaults for
|
||||
# any <VirtualHost> containers you may define later in the file.
|
||||
#
|
||||
# All of these directives may appear inside <VirtualHost> containers,
|
||||
# in which case these default settings will be overridden for the
|
||||
# virtual host being defined.
|
||||
#
|
||||
Include /etc/apache2/default-server.conf
|
||||
|
||||
|
||||
# Another way to include your own files
|
||||
#
|
||||
# The file below is generated from /etc/sysconfig/apache2,
|
||||
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
|
||||
# APACHE_CONF_INCLUDE_DIRS
|
||||
Include /etc/apache2/sysconfig.d/include.conf
|
||||
|
||||
|
||||
### Virtual server configuration ############################################
|
||||
#
|
||||
# VirtualHost: If you want to maintain multiple domains/hostnames on your
|
||||
# machine you can setup VirtualHost containers for them. Most configurations
|
||||
# use only name-based virtual hosts so the server doesn't need to worry about
|
||||
# IP addresses. This is indicated by the asterisks in the directives below.
|
||||
#
|
||||
# Please see the documentation at
|
||||
# <URL:http://httpd.apache.org/docs-2.2/vhosts/>
|
||||
# for further details before you try to setup virtual hosts.
|
||||
#
|
||||
# You may use the command line option '-S' to verify your virtual host
|
||||
# configuration.
|
||||
#
|
||||
Include /etc/apache2/vhosts.d/*.conf
|
||||
|
||||
|
||||
# Note: instead of adding your own configuration here, consider
|
||||
# adding it in your own file (/etc/apache2/httpd.conf.local)
|
||||
# putting its name into APACHE_CONF_INCLUDE_FILES in
|
||||
# /etc/sysconfig/apache2 -- this will make system updates
|
||||
# easier :)
|
47
apache2-listen.conf
Normal file
47
apache2-listen.conf
Normal file
@ -0,0 +1,47 @@
|
||||
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
||||
# ports. See also the <VirtualHost> directive.
|
||||
#
|
||||
# http://httpd.apache.org/docs-2.2/mod/mpm_common.html#listen
|
||||
#
|
||||
# Change this to Listen on specific IP addresses as shown below to
|
||||
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
|
||||
#
|
||||
# When we also provide SSL we have to listen to the
|
||||
# standard HTTP port (see above) and to the HTTPS port
|
||||
#
|
||||
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
|
||||
# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
|
||||
#
|
||||
#Listen 12.34.56.78:80
|
||||
#Listen 80
|
||||
#Listen 443
|
||||
|
||||
Listen 80
|
||||
|
||||
|
||||
<IfDefine SSL>
|
||||
<IfDefine !NOSSL>
|
||||
<IfModule mod_ssl.c>
|
||||
|
||||
Listen 443
|
||||
|
||||
</IfModule>
|
||||
</IfDefine>
|
||||
</IfDefine>
|
||||
|
||||
|
||||
# Use name-based virtual hosting
|
||||
#
|
||||
# - on a specified address / port:
|
||||
#
|
||||
#NameVirtualHost 12.34.56.78:80
|
||||
#
|
||||
# - name-based virtual hosting:
|
||||
#
|
||||
#NameVirtualHost *:80
|
||||
#
|
||||
# - on all addresses and ports. This is your best bet when you are on
|
||||
# dynamically assigned IP addresses:
|
||||
#
|
||||
#NameVirtualHost *
|
||||
|
22
apache2-manual.conf
Normal file
22
apache2-manual.conf
Normal file
@ -0,0 +1,22 @@
|
||||
#
|
||||
# This configuration file belongs to the apache2-doc package.
|
||||
#
|
||||
# The alias provides the manual, even if you choose to move your DocumentRoot.
|
||||
# this out if you do not care for the documentation.
|
||||
#
|
||||
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/share/apache2/manual$1"
|
||||
|
||||
<Directory "/usr/share/apache2/manual">
|
||||
Options Indexes
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
||||
<Files *.html>
|
||||
SetHandler type-map
|
||||
</Files>
|
||||
|
||||
SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
|
||||
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
|
||||
</Directory>
|
||||
|
51
apache2-mod_autoindex-defaults.conf
Normal file
51
apache2-mod_autoindex-defaults.conf
Normal file
@ -0,0 +1,51 @@
|
||||
#
|
||||
# Directives controlling the display of server-generated directory listings.
|
||||
#
|
||||
# see http://httpd.apache.org/docs-2.2/mod/mod_autoindex.html
|
||||
#
|
||||
|
||||
<IfModule mod_autoindex.c>
|
||||
|
||||
IndexOptions FancyIndexing VersionSort NameWidth=*
|
||||
|
||||
# Add Last-Modified and ETag values for the listed directory in the HTTP header,
|
||||
# based on files' modification dates
|
||||
#IndexOptions +TrackModified
|
||||
|
||||
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
|
||||
|
||||
AddIconByType (TXT,/icons/text.gif) text/*
|
||||
AddIconByType (IMG,/icons/image2.gif) image/*
|
||||
AddIconByType (SND,/icons/sound2.gif) audio/*
|
||||
AddIconByType (VID,/icons/movie.gif) video/*
|
||||
|
||||
AddIcon /icons/binary.gif .bin .exe
|
||||
AddIcon /icons/binhex.gif .hqx
|
||||
AddIcon /icons/tar.gif .tar
|
||||
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
|
||||
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
|
||||
AddIcon /icons/a.gif .ps .ai .eps
|
||||
AddIcon /icons/layout.gif .html .shtml .htm .pdf
|
||||
AddIcon /icons/text.gif .txt
|
||||
AddIcon /icons/c.gif .c
|
||||
AddIcon /icons/p.gif .pl .py
|
||||
AddIcon /icons/f.gif .for
|
||||
AddIcon /icons/dvi.gif .dvi
|
||||
AddIcon /icons/uuencoded.gif .uu
|
||||
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
|
||||
AddIcon /icons/tex.gif .tex
|
||||
AddIcon /icons/bomb.gif core
|
||||
|
||||
AddIcon /icons/back.gif ..
|
||||
AddIcon /icons/hand.right.gif README
|
||||
AddIcon /icons/folder.gif ^^DIRECTORY^^
|
||||
AddIcon /icons/blank.gif ^^BLANKICON^^
|
||||
|
||||
DefaultIcon /icons/unknown.gif
|
||||
|
||||
ReadmeName README.html
|
||||
HeaderName HEADER.html
|
||||
|
||||
IndexIgnore .??* *~ *# HEADER* RCS CVS *,v *,t
|
||||
|
||||
</IfModule>
|
15
apache2-mod_info.conf
Normal file
15
apache2-mod_info.conf
Normal file
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Allow remote server configuration reports, with the URL of
|
||||
# http://servername/server-info (requires that mod_info.c be loaded).
|
||||
#
|
||||
# see http://httpd.apache.org/docs-2.2/mod/mod_info.html
|
||||
#
|
||||
<IfModule mod_info.c>
|
||||
<Location /server-info>
|
||||
SetHandler server-info
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from localhost
|
||||
</Location>
|
||||
</IfModule>
|
||||
|
35
apache2-mod_log_config.conf
Normal file
35
apache2-mod_log_config.conf
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# The following directives define some format nicknames for use with
|
||||
# a CustomLog directive.
|
||||
#
|
||||
# http://httpd.apache.org/docs-2.2/mod/mod_log_config.html
|
||||
#
|
||||
|
||||
#
|
||||
# Format string: Nickname:
|
||||
#
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common
|
||||
LogFormat "%{Referer}i -> %U" referer
|
||||
LogFormat "%{User-agent}i" agent
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \
|
||||
\"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%v %h %l %u %t \"%r\" %>s %b \
|
||||
\"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||
|
||||
# To use %I and %O, you need to enable mod_logio
|
||||
<IfModule mod_logio.c>
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \
|
||||
\"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
||||
</IfModule>
|
||||
|
||||
# Use one of these when you want a compact non-error SSL logfile on a virtual
|
||||
# host basis:
|
||||
<IfModule mod_ssl.c>
|
||||
Logformat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \
|
||||
\"%r\" %b" ssl_common
|
||||
Logformat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \
|
||||
\"%r\" %b \"%{Referer}i\" \"%{User-Agent}i\"" ssl_combined
|
||||
</IfModule>
|
||||
|
||||
|
154
apache2-mod_mime-defaults.conf
Normal file
154
apache2-mod_mime-defaults.conf
Normal file
@ -0,0 +1,154 @@
|
||||
#
|
||||
# mod_mime configuration:
|
||||
# associate various bits of "meta information" with files by their filename extensions
|
||||
#
|
||||
# see http://httpd.apache.org/docs-2.2/mod/mod_mime.html
|
||||
#
|
||||
|
||||
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
|
||||
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
|
||||
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
|
||||
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
|
||||
# Norwegian (no) - Polish (pl) - Portugese (pt)
|
||||
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
|
||||
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
|
||||
#
|
||||
AddLanguage ca .ca
|
||||
AddLanguage cs .cz .cs
|
||||
AddLanguage da .dk
|
||||
AddLanguage de .de
|
||||
AddLanguage el .el
|
||||
AddLanguage en .en
|
||||
AddLanguage eo .eo
|
||||
AddLanguage es .es
|
||||
AddLanguage et .et
|
||||
AddLanguage fr .fr
|
||||
AddLanguage he .he
|
||||
AddLanguage hr .hr
|
||||
AddLanguage it .it
|
||||
AddLanguage ja .ja
|
||||
AddLanguage ko .ko
|
||||
AddLanguage ltz .ltz
|
||||
AddLanguage nl .nl
|
||||
AddLanguage nn .nn
|
||||
AddLanguage no .no
|
||||
AddLanguage pl .po
|
||||
AddLanguage pt .pt
|
||||
AddLanguage pt-BR .pt-br
|
||||
AddLanguage ru .ru
|
||||
AddLanguage sv .sv
|
||||
AddLanguage zh-CN .zh-cn
|
||||
AddLanguage zh-TW .zh-tw
|
||||
|
||||
#
|
||||
# LanguagePriority allows you to give precedence to some languages
|
||||
# in case of a tie during content negotiation.
|
||||
#
|
||||
# Just list the languages in decreasing order of preference. We have
|
||||
# more or less alphabetized them here. You probably want to change this.
|
||||
#
|
||||
<IfModule mod_negotiation.c>
|
||||
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
|
||||
#
|
||||
# ForceLanguagePriority allows you to serve a result page rather than
|
||||
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
|
||||
# [in case no accepted languages matched the available variants]
|
||||
#
|
||||
ForceLanguagePriority Prefer Fallback
|
||||
</IfModule>
|
||||
|
||||
#
|
||||
# Commonly used filename extensions to character sets. You probably
|
||||
# want to avoid clashes with the language extensions, unless you
|
||||
# are good at carefully testing your setup after each change.
|
||||
# See http://www.iana.org/assignments/character-sets for the
|
||||
# official list of charset names and their respective RFCs.
|
||||
#
|
||||
AddCharset ISO-8859-1 .iso8859-1 .latin1
|
||||
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
|
||||
AddCharset ISO-8859-3 .iso8859-3 .latin3
|
||||
AddCharset ISO-8859-4 .iso8859-4 .latin4
|
||||
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
|
||||
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
|
||||
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
|
||||
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
|
||||
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
|
||||
AddCharset ISO-2022-JP .iso2022-jp .jis
|
||||
AddCharset ISO-2022-KR .iso2022-kr .kis
|
||||
AddCharset ISO-2022-CN .iso2022-cn .cis
|
||||
AddCharset Big5 .Big5 .big5
|
||||
# For russian, more than one charset is used (depends on client, mostly):
|
||||
AddCharset WINDOWS-1251 .cp-1251 .win-1251
|
||||
AddCharset CP866 .cp866
|
||||
AddCharset KOI8-r .koi8-r .koi8-ru
|
||||
AddCharset KOI8-ru .koi8-uk .ua
|
||||
AddCharset ISO-10646-UCS-2 .ucs2
|
||||
AddCharset ISO-10646-UCS-4 .ucs4
|
||||
AddCharset UTF-8 .utf8
|
||||
|
||||
# The set below does not map to a specific (iso) standard
|
||||
# but works on a fairly wide range of browsers. Note that
|
||||
# capitalization actually matters (it should not, but it
|
||||
# does for some browsers).
|
||||
#
|
||||
# See http://www.iana.org/assignments/character-sets
|
||||
# for a list of sorts. But browsers support few.
|
||||
#
|
||||
AddCharset GB2312 .gb2312 .gb
|
||||
AddCharset utf-7 .utf7
|
||||
AddCharset utf-8 .utf8
|
||||
AddCharset big5 .big5 .b5
|
||||
AddCharset EUC-TW .euc-tw
|
||||
AddCharset EUC-JP .euc-jp
|
||||
AddCharset EUC-KR .euc-kr
|
||||
AddCharset shift_jis .sjis
|
||||
|
||||
|
||||
#
|
||||
# AddType allows you to add to or override the MIME configuration
|
||||
# file mime.types for specific file types.
|
||||
#
|
||||
#AddType application/x-tar .tgz
|
||||
#
|
||||
# AddEncoding allows you to have certain browsers uncompress
|
||||
# information on the fly. Note: Not all browsers support this.
|
||||
# Despite the name similarity, the following Add* directives have nothing
|
||||
# to do with the FancyIndexing customization directives above.
|
||||
#
|
||||
#AddEncoding x-compress .Z
|
||||
#AddEncoding x-gzip .gz .tgz
|
||||
#
|
||||
# If the AddEncoding directives above are commented-out, then you
|
||||
# probably should define those extensions to indicate media types:
|
||||
#
|
||||
AddType application/x-compress .Z
|
||||
AddType application/x-gzip .gz .tgz
|
||||
|
||||
# Shortcut icons don't seem to be registered by IANA yet, but they
|
||||
# are so commonly used that we add them here.
|
||||
Addtype image/x-icon .ico
|
||||
|
||||
#
|
||||
# For type maps (negotiated resources):
|
||||
# (This is enabled by default to allow the Apache "It Worked" page
|
||||
# to be distributed in multiple languages.)
|
||||
#
|
||||
AddHandler type-map var
|
||||
|
||||
|
||||
#
|
||||
# Filters allow you to process content before it is sent to the client.
|
||||
#
|
||||
# To parse .shtml files for server-side includes (SSI):
|
||||
# (You will also need to add "Includes" to the "Options" directive.)
|
||||
#
|
||||
#AddType text/html .shtml
|
||||
#AddOutputFilter INCLUDES .shtml
|
||||
|
||||
|
||||
# Guess the MIME type of a file by looking at a few bytes of its contents
|
||||
# http://httpd.apache.org/docs-2.2/mod/mod_mime_magic.html
|
||||
<IfModule mod_mime_magic.c>
|
||||
MIMEMagicFile /etc/apache2/magic
|
||||
</IfModule>
|
||||
|
15
apache2-mod_status.conf
Normal file
15
apache2-mod_status.conf
Normal file
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Allow server status reports generated by mod_status,
|
||||
# with the URL of http://servername/server-status
|
||||
#
|
||||
# see http://httpd.apache.org/docs-2.2/mod/mod_status.html
|
||||
#
|
||||
<IfModule mod_status.c>
|
||||
<Location /server-status>
|
||||
SetHandler server-status
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from localhost
|
||||
</Location>
|
||||
</IfModule>
|
||||
|
45
apache2-mod_userdir.conf
Normal file
45
apache2-mod_userdir.conf
Normal file
@ -0,0 +1,45 @@
|
||||
#
|
||||
# UserDir: The name of the directory that is appended onto a user's home
|
||||
# directory if a ~user request is received.
|
||||
#
|
||||
|
||||
<IfModule mod_userdir.c>
|
||||
# Note that the name of the user directory ("public_html") cannot easily be
|
||||
# changed here, since it is a compile time setting. The apache package
|
||||
# would have to be rebuilt. You could work around by deleting
|
||||
# /usr/sbin/suexec, but then all scripts from the directories would be
|
||||
# executed with the UID of the webserver.
|
||||
#
|
||||
# To rebuild apache with another setting you need to change the
|
||||
# %userdir define in the spec file.
|
||||
|
||||
# not every user's directory should be visible:
|
||||
UserDir disabled root
|
||||
|
||||
# to enable UserDir only for a certain set of users, use this instead:
|
||||
#UserDir disabled
|
||||
#UserDir enabled user1 user2
|
||||
|
||||
|
||||
# the UserDir directive is actually used inside the virtual hosts, to
|
||||
# have more control
|
||||
#UserDir public_html
|
||||
|
||||
<Directory /home/*/public_html>
|
||||
|
||||
AllowOverride FileInfo AuthConfig Limit Indexes
|
||||
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
|
||||
|
||||
<Limit GET POST OPTIONS PROPFIND>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Limit>
|
||||
|
||||
<LimitExcept GET POST OPTIONS PROPFIND>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</LimitExcept>
|
||||
|
||||
</Directory>
|
||||
|
||||
</IfModule>
|
7
apache2-mod_usertrack.conf
Normal file
7
apache2-mod_usertrack.conf
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
<IfModule mod_usertrack.c>
|
||||
|
||||
# This is the default.
|
||||
CookieName Apache
|
||||
|
||||
</IfModule>
|
134
apache2-server-tuning.conf
Normal file
134
apache2-server-tuning.conf
Normal file
@ -0,0 +1,134 @@
|
||||
##
|
||||
## Server-Pool Size Regulation (MPM specific)
|
||||
##
|
||||
|
||||
# the MPM (multiprocessing module) is not a dynamically loadable module in the
|
||||
# sense of other modules. It is a compile time decision which one is used. We
|
||||
# provide different apache2 MPM packages, containing different httpd2 binaries
|
||||
# compiled with the available MPMs. See APACHE_MPM in /etc/sysconfig/apache2.
|
||||
|
||||
# prefork MPM
|
||||
<IfModule prefork.c>
|
||||
# number of server processes to start
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
|
||||
StartServers 5
|
||||
# minimum number of server processes which are kept spare
|
||||
# http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers
|
||||
MinSpareServers 5
|
||||
# maximum number of server processes which are kept spare
|
||||
# http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers
|
||||
MaxSpareServers 10
|
||||
# highest possible MaxClients setting for the lifetime of the Apache process.
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
|
||||
ServerLimit 150
|
||||
# maximum number of server processes allowed to start
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
|
||||
MaxClients 150
|
||||
# maximum number of requests a server process serves
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
|
||||
MaxRequestsPerChild 10000
|
||||
</IfModule>
|
||||
|
||||
# worker MPM
|
||||
<IfModule worker.c>
|
||||
# initial number of server processes to start
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers
|
||||
StartServers 3
|
||||
# minimum number of worker threads which are kept spare
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#minsparethreads
|
||||
MinSpareThreads 25
|
||||
# maximum number of worker threads which are kept spare
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxsparethreads
|
||||
MaxSpareThreads 75
|
||||
# upper limit on the configurable number of threads per child process
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadlimit
|
||||
ThreadLimit 64
|
||||
# maximum number of simultaneous client connections
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients
|
||||
MaxClients 150
|
||||
# number of worker threads created by each child process
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadsperchild
|
||||
ThreadsPerChild 25
|
||||
# maximum number of requests a server process serves
|
||||
# http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild
|
||||
MaxRequestsPerChild 10000
|
||||
</IfModule>
|
||||
|
||||
# leader MPM
|
||||
<IfModule leader.c>
|
||||
# initial number of server processes to start
|
||||
StartServers 2
|
||||
# minimum number of worker threads which are kept spare
|
||||
MinSpareThreads 25
|
||||
# maximum number of worker threads which are kept spare
|
||||
MaxSpareThreads 75
|
||||
# maximum number of simultaneous client connections
|
||||
MaxClients 150
|
||||
# constant number of worker threads in each server process
|
||||
ThreadsPerChild 25
|
||||
# maximum number of requests a server process serves
|
||||
MaxRequestsPerChild 10000
|
||||
</IfModule>
|
||||
|
||||
|
||||
#
|
||||
# KeepAlive: Whether or not to allow persistent connections (more than
|
||||
# one request per connection). Set to "Off" to deactivate.
|
||||
#
|
||||
KeepAlive On
|
||||
|
||||
#
|
||||
# MaxKeepAliveRequests: The maximum number of requests to allow
|
||||
# during a persistent connection. Set to 0 to allow an unlimited amount.
|
||||
# We recommend you leave this number high, for maximum performance.
|
||||
#
|
||||
MaxKeepAliveRequests 100
|
||||
|
||||
#
|
||||
# KeepAliveTimeout: Number of seconds to wait for the next request from the
|
||||
# same client on the same connection.
|
||||
#
|
||||
KeepAliveTimeout 15
|
||||
|
||||
#
|
||||
# EnableMMAP: Control whether memory-mapping is used to deliver
|
||||
# files (assuming that the underlying OS supports it).
|
||||
# The default is on; turn this off if you serve from NFS-mounted
|
||||
# filesystems. On some systems, turning it off (regardless of
|
||||
# filesystem) can improve performance; for details, please see
|
||||
# http://httpd.apache.org/docs-2.2/mod/core.html#enablemmap
|
||||
#
|
||||
#EnableMMAP off
|
||||
|
||||
#
|
||||
# EnableSendfile: Control whether the sendfile kernel support is
|
||||
# used to deliver files (assuming that the OS supports it).
|
||||
# The default is on; turn this off if you serve from NFS-mounted
|
||||
# filesystems. Please see
|
||||
# http://httpd.apache.org/docs-2.2/mod/core.html#enablesendfile
|
||||
#
|
||||
#EnableSendfile off
|
||||
|
||||
|
||||
#
|
||||
# The following directives modify normal HTTP response behavior to
|
||||
# handle known problems with browser implementations.
|
||||
#
|
||||
BrowserMatch "Mozilla/2" nokeepalive
|
||||
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
|
||||
BrowserMatch "RealPlayer 4\.0" force-response-1.0
|
||||
BrowserMatch "Java/1\.0" force-response-1.0
|
||||
BrowserMatch "JDK/1\.0" force-response-1.0
|
||||
|
||||
#
|
||||
# The following directive disables redirects on non-GET requests for
|
||||
# a directory that does not include the trailing slash. This fixes a
|
||||
# problem with Microsoft WebFolders which does not appropriately handle
|
||||
# redirects for folders with DAV methods.
|
||||
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
|
||||
#
|
||||
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
|
||||
BrowserMatch "^WebDrive" redirect-carefully
|
||||
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
|
||||
BrowserMatch "^gnome-vfs" redirect-carefully
|
||||
|
72
apache2-ssl-global.conf
Normal file
72
apache2-ssl-global.conf
Normal file
@ -0,0 +1,72 @@
|
||||
##
|
||||
## SSL Global Context
|
||||
##
|
||||
## All SSL configuration in this context applies both to
|
||||
## the main server and all SSL-enabled virtual hosts.
|
||||
##
|
||||
|
||||
# These are the configuration directives to instruct the server how to
|
||||
# serve pages over an https connection. For detailing information about these
|
||||
# directives see <URL:http://httpd.apache.org/docs-2.2/mod/mod_ssl.html>
|
||||
#
|
||||
# Do NOT simply read the instructions in here without understanding
|
||||
# what they do. They're here only as hints or reminders. If you are unsure
|
||||
# consult the online docs. You have been warned.
|
||||
|
||||
# This global SSL configuration is ignored if
|
||||
# "SSL" is not defined, or if "NOSSL" is defined.
|
||||
<IfDefine SSL>
|
||||
<IfDefine !NOSSL>
|
||||
<IfModule mod_ssl.c>
|
||||
|
||||
#
|
||||
# Some MIME-types for downloading Certificates and CRLs
|
||||
#
|
||||
AddType application/x-x509-ca-cert .crt
|
||||
AddType application/x-pkcs7-crl .crl
|
||||
|
||||
# Pass Phrase Dialog:
|
||||
# Configure the pass phrase gathering process.
|
||||
# The filtering dialog program (`builtin' is a internal
|
||||
# terminal dialog) has to provide the pass phrase on stdout.
|
||||
SSLPassPhraseDialog builtin
|
||||
|
||||
# Inter-Process Session Cache:
|
||||
# Configure the SSL Session Cache: First the mechanism
|
||||
# to use and second the expiring timeout (in seconds).
|
||||
# shm means the same as shmht.
|
||||
# Note that on most platforms shared memory segments are not allowed to be on
|
||||
# network-mounted drives, so in that case you need to use the dbm method.
|
||||
#SSLSessionCache none
|
||||
#SSLSessionCache dbm:/var/lib/apache2/ssl_scache
|
||||
#SSLSessionCache shmht:/var/lib/apache2/ssl_scache(512000)
|
||||
SSLSessionCache shmcb:/var/lib/apache2/ssl_scache(512000)
|
||||
SSLSessionCacheTimeout 600
|
||||
|
||||
# This configures the SSL engine's semaphore (aka. lock) which is
|
||||
# used for mutual exclusion of operations which have to be done in a
|
||||
# synchronized way between the pre-forked Apache server processes.
|
||||
# "default" tells the SSL Module to pick the default locking
|
||||
# implementation as determined by the platform and APR.
|
||||
SSLMutex default
|
||||
|
||||
# Pseudo Random Number Generator (PRNG):
|
||||
# Configure one or more sources to seed the PRNG of the
|
||||
# SSL library. The seed data should be of good random quality.
|
||||
# WARNING! On some platforms /dev/random blocks if not enough entropy
|
||||
# is available. This means you then cannot use the /dev/random device
|
||||
# because it would lead to very long connection times (as long as
|
||||
# it requires to make more entropy available). But usually those
|
||||
# platforms additionally provide a /dev/urandom device which doesn't
|
||||
# block. So, if available, use this one instead. Read the mod_ssl User
|
||||
# Manual for more details.
|
||||
SSLRandomSeed startup builtin
|
||||
SSLRandomSeed connect builtin
|
||||
#SSLRandomSeed startup file:/dev/random 512
|
||||
#SSLRandomSeed connect file:/dev/random 512
|
||||
#SSLRandomSeed startup file:/dev/urandom 512
|
||||
#SSLRandomSeed connect file:/dev/urandom 512
|
||||
|
||||
</IfModule>
|
||||
</IfDefine>
|
||||
</IfDefine>
|
201
apache2-vhost-ssl.template
Normal file
201
apache2-vhost-ssl.template
Normal file
@ -0,0 +1,201 @@
|
||||
# Template for a VirtualHost with SSL
|
||||
# Note: to use the template, rename it to /etc/apache2/vhost.d/yourvhost.conf.
|
||||
# Files must have the .conf suffix to be loaded.
|
||||
#
|
||||
# See /usr/share/doc/packages/apache2/README.QUICKSTART for further hints
|
||||
# about virtual hosts.
|
||||
|
||||
# NameVirtualHost statements should be added to /etc/apache2/listen.conf.
|
||||
|
||||
#
|
||||
# This is the Apache server configuration file providing SSL support.
|
||||
# It contains the configuration directives to instruct the server how to
|
||||
# serve pages over an https connection. For detailing information about these
|
||||
# directives see <URL:http://httpd.apache.org/docs-2.2/mod/mod_ssl.html>
|
||||
#
|
||||
# For the moment, see <URL:http://www.modssl.org/docs/> for this info.
|
||||
# The documents are still being prepared from material donated by the
|
||||
# modssl project.
|
||||
#
|
||||
# Do NOT simply read the instructions in here without understanding
|
||||
# what they do. They're here only as hints or reminders. If you are unsure
|
||||
# consult the online docs. You have been warned.
|
||||
#
|
||||
|
||||
# Until documentation is completed, please check http://www.modssl.org/
|
||||
# for additional config examples and module docmentation. Directives
|
||||
# and features of mod_ssl are largely unchanged from the mod_ssl project
|
||||
# for Apache 1.3.
|
||||
|
||||
<IfDefine SSL>
|
||||
<IfDefine !NOSSL>
|
||||
|
||||
##
|
||||
## SSL Virtual Host Context
|
||||
##
|
||||
|
||||
<VirtualHost _default_:443>
|
||||
|
||||
# General setup for the virtual host
|
||||
DocumentRoot "/srv/www/htdocs"
|
||||
#ServerName www.example.com:443
|
||||
#ServerAdmin webmaster@example.com
|
||||
ErrorLog /var/log/apache2/error_log
|
||||
TransferLog /var/log/apache2/access_log
|
||||
|
||||
# SSL Engine Switch:
|
||||
# Enable/Disable SSL for this virtual host.
|
||||
SSLEngine on
|
||||
|
||||
# SSL Cipher Suite:
|
||||
# List the ciphers that the client is permitted to negotiate.
|
||||
# See the mod_ssl documentation for a complete list.
|
||||
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
|
||||
|
||||
# Server Certificate:
|
||||
# Point SSLCertificateFile at a PEM encoded certificate. If
|
||||
# the certificate is encrypted, then you will be prompted for a
|
||||
# pass phrase. Note that a kill -HUP will prompt again. Keep
|
||||
# in mind that if you have both an RSA and a DSA certificate you
|
||||
# can configure both in parallel (to also allow the use of DSA
|
||||
# ciphers, etc.)
|
||||
SSLCertificateFile /etc/apache2/ssl.crt/server.crt
|
||||
#SSLCertificateFile /etc/apache2/ssl.crt/server-dsa.crt
|
||||
|
||||
# Server Private Key:
|
||||
# If the key is not combined with the certificate, use this
|
||||
# directive to point at the key file. Keep in mind that if
|
||||
# you've both a RSA and a DSA private key you can configure
|
||||
# both in parallel (to also allow the use of DSA ciphers, etc.)
|
||||
SSLCertificateKeyFile /etc/apache2/ssl.key/server.key
|
||||
#SSLCertificateKeyFile /etc/apache2/ssl.key/server-dsa.key
|
||||
|
||||
# Server Certificate Chain:
|
||||
# Point SSLCertificateChainFile at a file containing the
|
||||
# concatenation of PEM encoded CA certificates which form the
|
||||
# certificate chain for the server certificate. Alternatively
|
||||
# the referenced file can be the same as SSLCertificateFile
|
||||
# when the CA certificates are directly appended to the server
|
||||
# certificate for convinience.
|
||||
#SSLCertificateChainFile /etc/apache2/ssl.crt/ca.crt
|
||||
|
||||
# Certificate Authority (CA):
|
||||
# Set the CA certificate verification path where to find CA
|
||||
# certificates for client authentication or alternatively one
|
||||
# huge file containing all of them (file must be PEM encoded)
|
||||
# Note: Inside SSLCACertificatePath you need hash symlinks
|
||||
# to point to the certificate files. Use the provided
|
||||
# Makefile to update the hash symlinks after changes.
|
||||
#SSLCACertificatePath /etc/apache2/ssl.crt
|
||||
#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
|
||||
|
||||
# Certificate Revocation Lists (CRL):
|
||||
# Set the CA revocation path where to find CA CRLs for client
|
||||
# authentication or alternatively one huge file containing all
|
||||
# of them (file must be PEM encoded)
|
||||
# Note: Inside SSLCARevocationPath you need hash symlinks
|
||||
# to point to the certificate files. Use the provided
|
||||
# Makefile to update the hash symlinks after changes.
|
||||
#SSLCARevocationPath /etc/apache2/ssl.crl
|
||||
#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
|
||||
|
||||
# Client Authentication (Type):
|
||||
# Client certificate verification type and depth. Types are
|
||||
# none, optional, require and optional_no_ca. Depth is a
|
||||
# number which specifies how deeply to verify the certificate
|
||||
# issuer chain before deciding the certificate is not valid.
|
||||
#SSLVerifyClient require
|
||||
#SSLVerifyDepth 10
|
||||
|
||||
# Access Control:
|
||||
# With SSLRequire you can do per-directory access control based
|
||||
# on arbitrary complex boolean expressions containing server
|
||||
# variable checks and other lookup directives. The syntax is a
|
||||
# mixture between C and Perl. See the mod_ssl documentation
|
||||
# for more details.
|
||||
#<Location />
|
||||
#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
|
||||
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
|
||||
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
|
||||
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
|
||||
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
|
||||
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
|
||||
#</Location>
|
||||
|
||||
# SSL Engine Options:
|
||||
# Set various options for the SSL engine.
|
||||
# o FakeBasicAuth:
|
||||
# Translate the client X.509 into a Basic Authorisation. This means that
|
||||
# the standard Auth/DBMAuth methods can be used for access control. The
|
||||
# user name is the `one line' version of the client's X.509 certificate.
|
||||
# Note that no password is obtained from the user. Every entry in the user
|
||||
# file needs this password: `xxj31ZMTZzkVA'.
|
||||
# o ExportCertData:
|
||||
# This exports two additional environment variables: SSL_CLIENT_CERT and
|
||||
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
|
||||
# server (always existing) and the client (only existing when client
|
||||
# authentication is used). This can be used to import the certificates
|
||||
# into CGI scripts.
|
||||
# o StdEnvVars:
|
||||
# This exports the standard SSL/TLS related `SSL_*' environment variables.
|
||||
# Per default this exportation is switched off for performance reasons,
|
||||
# because the extraction step is an expensive operation and is usually
|
||||
# useless for serving static content. So one usually enables the
|
||||
# exportation for CGI and SSI requests only.
|
||||
# o CompatEnvVars:
|
||||
# This exports obsolete environment variables for backward compatibility
|
||||
# to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
|
||||
# to provide compatibility to existing CGI scripts.
|
||||
# o StrictRequire:
|
||||
# This denies access when "SSLRequireSSL" or "SSLRequire" applied even
|
||||
# under a "Satisfy any" situation, i.e. when it applies access is denied
|
||||
# and no other module can change it.
|
||||
# o OptRenegotiate:
|
||||
# This enables optimized SSL connection renegotiation handling when SSL
|
||||
# directives are used in per-directory context.
|
||||
#SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
|
||||
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
|
||||
SSLOptions +StdEnvVars
|
||||
</Files>
|
||||
<Directory "/srv/www/cgi-bin">
|
||||
SSLOptions +StdEnvVars
|
||||
</Directory>
|
||||
|
||||
# SSL Protocol Adjustments:
|
||||
# The safe and default but still SSL/TLS standard compliant shutdown
|
||||
# approach is that mod_ssl sends the close notify alert but doesn't wait for
|
||||
# the close notify alert from client. When you need a different shutdown
|
||||
# approach you can use one of the following variables:
|
||||
# o ssl-unclean-shutdown:
|
||||
# This forces an unclean shutdown when the connection is closed, i.e. no
|
||||
# SSL close notify alert is send or allowed to received. This violates
|
||||
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
|
||||
# this when you receive I/O errors because of the standard approach where
|
||||
# mod_ssl sends the close notify alert.
|
||||
# o ssl-accurate-shutdown:
|
||||
# This forces an accurate shutdown when the connection is closed, i.e. a
|
||||
# SSL close notify alert is send and mod_ssl waits for the close notify
|
||||
# alert of the client. This is 100% SSL/TLS standard compliant, but in
|
||||
# practice often causes hanging connections with brain-dead browsers. Use
|
||||
# this only for browsers where you know that their SSL implementation
|
||||
# works correctly.
|
||||
# Notice: Most problems of broken clients are also related to the HTTP
|
||||
# keep-alive facility, so you usually additionally want to disable
|
||||
# keep-alive for those clients, too. Use variable "nokeepalive" for this.
|
||||
# Similarly, one has to force some clients to use HTTP/1.0 to workaround
|
||||
# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
|
||||
# "force-response-1.0" for this.
|
||||
SetEnvIf User-Agent ".*MSIE.*" \
|
||||
nokeepalive ssl-unclean-shutdown \
|
||||
downgrade-1.0 force-response-1.0
|
||||
|
||||
# Per-Server Logging:
|
||||
# The home of a custom SSL log file. Use this when you want a
|
||||
# compact non-error SSL logfile on a virtual host basis.
|
||||
CustomLog /var/log/apache2/ssl_request_log ssl_combined
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
</IfDefine>
|
||||
</IfDefine>
|
||||
|
125
apache2-vhost.template
Normal file
125
apache2-vhost.template
Normal file
@ -0,0 +1,125 @@
|
||||
#
|
||||
# VirtualHost template
|
||||
# Note: to use the template, rename it to /etc/apache2/vhost.d/yourvhost.conf.
|
||||
# Files must have the .conf suffix to be loaded.
|
||||
#
|
||||
# See /usr/share/doc/packages/apache2/README.QUICKSTART for further hints
|
||||
# about virtual hosts.
|
||||
#
|
||||
# NameVirtualHost statements can be added to /etc/apache2/listen.conf.
|
||||
#
|
||||
# Almost any Apache directive may go into a VirtualHost container.
|
||||
# The first VirtualHost section is used for requests without a known
|
||||
# server name.
|
||||
#
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@dummy-host.example.com
|
||||
ServerName dummy-host.example.com
|
||||
|
||||
# DocumentRoot: The directory out of which you will serve your
|
||||
# documents. By default, all requests are taken from this directory, but
|
||||
# symbolic links and aliases may be used to point to other locations.
|
||||
DocumentRoot /srv/www/vhosts/dummy-host.example.com
|
||||
|
||||
# if not specified, the global error log is used
|
||||
ErrorLog /var/log/apache2/dummy-host.example.com-error_log
|
||||
CustomLog /var/log/apache2/dummy-host.example.com-access_log combined
|
||||
|
||||
# don't loose time with IP address lookups
|
||||
HostnameLookups Off
|
||||
|
||||
# needed for named virtual hosts
|
||||
UseCanonicalName Off
|
||||
|
||||
# configures the footer on server-generated documents
|
||||
ServerSignature On
|
||||
|
||||
|
||||
# Optionally, include *.conf files from /etc/apache2/conf.d/
|
||||
#
|
||||
# For example, to allow execution of PHP scripts:
|
||||
#
|
||||
# Include /etc/apache2/conf.d/mod_php4.conf
|
||||
#
|
||||
# or, to include all configuration snippets added by packages:
|
||||
# Include /etc/apache2/conf.d/*.conf
|
||||
|
||||
|
||||
# ScriptAlias: This controls which directories contain server scripts.
|
||||
# ScriptAliases are essentially the same as Aliases, except that
|
||||
# documents in the realname directory are treated as applications and
|
||||
# run by the server when requested rather than as documents sent to the client.
|
||||
# The same rules about trailing "/" apply to ScriptAlias directives as to
|
||||
# Alias.
|
||||
#
|
||||
ScriptAlias /cgi-bin/ "/srv/www/vhosts/dummy-host.example.com/cgi-bin/"
|
||||
|
||||
# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
|
||||
# CGI directory exists, if you have one, and where ScriptAlias points to.
|
||||
#
|
||||
<Directory "/srv/www/vhosts/dummy-host.example.com/cgi-bin">
|
||||
AllowOverride None
|
||||
Options +ExecCGI -Includes
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
|
||||
# UserDir: The name of the directory that is appended onto a user's home
|
||||
# directory if a ~user request is received.
|
||||
#
|
||||
# To disable it, simply remove userdir from the list of modules in APACHE_MODULES
|
||||
# in /etc/sysconfig/apache2.
|
||||
#
|
||||
<IfModule mod_userdir.c>
|
||||
# Note that the name of the user directory ("public_html") cannot simply be
|
||||
# changed here, since it is a compile time setting. The apache package
|
||||
# would have to be rebuilt. You could work around by deleting
|
||||
# /usr/sbin/suexec, but then all scripts from the directories would be
|
||||
# executed with the UID of the webserver.
|
||||
UserDir public_html
|
||||
# The actual configuration of the directory is in
|
||||
# /etc/apache2/mod_userdir.conf.
|
||||
Include /etc/apache2/mod_userdir.conf
|
||||
# You can, however, change the ~ if you find it awkward, by mapping e.g.
|
||||
# http://www.example.com/users/karl-heinz/ --> /home/karl-heinz/public_html/
|
||||
#AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2
|
||||
</IfModule>
|
||||
|
||||
|
||||
#
|
||||
# This should be changed to whatever you set DocumentRoot to.
|
||||
#
|
||||
<Directory "/srv/www/vhosts/dummy-host.example.com">
|
||||
|
||||
#
|
||||
# Possible values for the Options directive are "None", "All",
|
||||
# or any combination of:
|
||||
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
|
||||
#
|
||||
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
||||
# doesn't give it to you.
|
||||
#
|
||||
# The Options directive is both complicated and important. Please see
|
||||
# http://httpd.apache.org/docs-2.2/mod/core.html#options
|
||||
# for more information.
|
||||
#
|
||||
Options Indexes FollowSymLinks
|
||||
|
||||
#
|
||||
# AllowOverride controls what directives may be placed in .htaccess files.
|
||||
# It can be "All", "None", or any combination of the keywords:
|
||||
# Options FileInfo AuthConfig Limit
|
||||
#
|
||||
AllowOverride None
|
||||
|
||||
#
|
||||
# Controls who can get stuff from this server.
|
||||
#
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
||||
|
2072
apache2.changes
Normal file
2072
apache2.changes
Normal file
File diff suppressed because it is too large
Load Diff
69
apache2.logrotate
Normal file
69
apache2.logrotate
Normal file
@ -0,0 +1,69 @@
|
||||
/var/log/apache2/access_log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+4096k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/apache2/error_log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+1024k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/apache2/suexec.log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+1024k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/apache2/ssl_request_log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+4096k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/apache2/ssl_engine_log {
|
||||
compress
|
||||
dateext
|
||||
maxage 365
|
||||
rotate 99
|
||||
size=+1024k
|
||||
notifempty
|
||||
missingok
|
||||
create 644 root root
|
||||
postrotate
|
||||
/etc/init.d/apache2 reload
|
||||
endscript
|
||||
}
|
2704
apache2.spec
Normal file
2704
apache2.spec
Normal file
File diff suppressed because it is too large
Load Diff
4
certificate.sh
Normal file
4
certificate.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
./mkcert.sh make --no-print-directory /usr/bin/openssl /usr/sbin/ test
|
||||
|
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 302 B |
31
find_httpd2_includes
Normal file
31
find_httpd2_includes
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Read the configuration (recursing through all include files)
|
||||
|
||||
. /usr/share/apache2/load_configuration
|
||||
: ${sysconfdir:=/etc/apache2}
|
||||
httpd_conf=${APACHE_HTTPD_CONF:-$sysconfdir/httpd.conf}
|
||||
|
||||
find_include_files () {
|
||||
local found i
|
||||
found=$(awk '/^[[:space:]]*Include/ { print $2 }' $1 2>/dev/null)
|
||||
for i in $found; do
|
||||
case $i in
|
||||
*\**)
|
||||
# filter filenames that are unexpanded, in the lack of a match,
|
||||
# like /etc/apache2/conf.d/*.conf
|
||||
;;
|
||||
*)
|
||||
conffiles="$conffiles $i"
|
||||
find_include_files $i
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
find_include_files $httpd_conf
|
||||
|
||||
#echo $httpd_conf $conffiles
|
||||
echo $conffiles
|
||||
exit 0
|
||||
|
46
find_mpm
Normal file
46
find_mpm
Normal file
@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
: ${apache_link:=/usr/sbin/httpd2}
|
||||
|
||||
. /usr/share/apache2/load_configuration
|
||||
|
||||
if ! ${mpm_set:=false}; then
|
||||
if [ -z "$APACHE_MPM" ]; then
|
||||
# guess
|
||||
for i in $r/$apache_link-*; do
|
||||
test -f $i || continue
|
||||
i=$(basename $i)
|
||||
i=${i#*-}
|
||||
installed_mpms=(${installed_mpms[*]} $i)
|
||||
done
|
||||
if [ -z "${installed_mpms[*]}" ]; then
|
||||
echo >&2 ${warn}Apache binary ${apache_link#*-} not found. No MPM package installed? $norm
|
||||
echo >&2 Hint: install the apache2-prefork package, and try again.
|
||||
fi
|
||||
if [ ${#installed_mpms[*]} = 1 ]; then
|
||||
APACHE_MPM=${installed_mpms[*]}
|
||||
else
|
||||
case ${installed_mpms[*]} in
|
||||
*prefork*) APACHE_MPM=prefork;;
|
||||
*worker*) APACHE_MPM=worker;;
|
||||
*event*) APACHE_MPM=event;;
|
||||
*leader*) APACHE_MPM=leader;;
|
||||
*metuxmpm*) APACHE_MPM=metuxmpm;;
|
||||
*threadpool*) APACHE_MPM=threadpool;;
|
||||
esac
|
||||
fi
|
||||
|
||||
fi
|
||||
if [ -x $apache_link-$APACHE_MPM ]; then
|
||||
ln -sf $apache_link-$APACHE_MPM $apache_link
|
||||
echo $apache_link-$APACHE_MPM
|
||||
else
|
||||
echo >&2 ${warn}$apache_link-$APACHE_MPM is not a valid httpd2 binary.
|
||||
echo >&2 Check your APACHE_MPM setting.$norm
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export APACHE_MPM mpm_set=true
|
||||
fi
|
||||
|
||||
|
198
gensslcert
Normal file
198
gensslcert
Normal file
@ -0,0 +1,198 @@
|
||||
#!/bin/bash
|
||||
# Peter Poeml <poeml@suse.de>
|
||||
#
|
||||
# Script to generate ssl keys for mod_ssl, without requiring user input
|
||||
# most of it is copied from mkcert.sh of the mod_ssl distribution
|
||||
#
|
||||
# XXX This is just a hack, it won't be able to do anything you want!
|
||||
#
|
||||
|
||||
function usage
|
||||
{
|
||||
cat <<-EOF
|
||||
`basename $0` will generate a test certificate "the quick way", i.e. without interaction.
|
||||
You can change some defaults however.
|
||||
It will overwrite /root/.mkcert.cfg
|
||||
|
||||
These options are recognized: Default:
|
||||
|
||||
-C Common name "$name"
|
||||
-N comment "$comment"
|
||||
-c country (two letters, e.g. DE) $C
|
||||
-s state $ST
|
||||
-l city $L
|
||||
-o organisation "$O"
|
||||
-u organisational unit "$U"
|
||||
-n fully qualified domain name $CN (\$FQHOSTNAME)
|
||||
-e email address of webmaster webmaster@$CN
|
||||
-y days server cert is valid for $srvdays
|
||||
-Y days CA cert is valid for $CAdays
|
||||
-d run in debug mode
|
||||
-h show usage
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
test -t && { BRIGHT='[01m'; RED='[31m'; NORMAL='[00m'; }
|
||||
function myecho { echo $BRIGHT$@$NORMAL; }
|
||||
function error { echo $RED$@$NORMAL; }
|
||||
function myexit { error something ugly seems to have happened in line $1...; exit $2; }
|
||||
|
||||
r=$ROOT
|
||||
. $r/etc/sysconfig/network/config
|
||||
FQHOSTNAME=`cat /etc/HOSTNAME`
|
||||
|
||||
# defaults
|
||||
comment="mod_ssl server certificate"
|
||||
name=
|
||||
C=XY
|
||||
ST=unknown
|
||||
L=unknown
|
||||
U="web server"
|
||||
O="SuSE Linux Web Server"
|
||||
CN=$FQHOSTNAME
|
||||
email=webmaster@$FQHOSTNAME
|
||||
CAdays=$((365 * 6))
|
||||
srvdays=$((365 * 2))
|
||||
|
||||
while getopts C:N:c:s:l:o:u:n:e:y:dh OPT; do
|
||||
case $OPT in
|
||||
C) name=$OPTARG-;;
|
||||
N) comment=$OPTARG;;
|
||||
c) C=$OPTARG;;
|
||||
s) ST=$OPTARG;;
|
||||
l) L=$OPTARG;;
|
||||
u) U=$OPTARG;;
|
||||
o) O=$OPTARG;;
|
||||
n) CN=$OPTARG;;
|
||||
e) email=$OPTARG;;
|
||||
y) srvdays=$OPTARG;;
|
||||
Y) CAdays=$OPTARG;;
|
||||
d) set -x;;
|
||||
h) usage; exit 2;;
|
||||
*) echo unrecognized option: $OPT; usage; exit 2;;
|
||||
esac
|
||||
done
|
||||
|
||||
GO_LEFT="\033[80D"
|
||||
GO_MIDDLE="$GO_LEFT\033[15C"
|
||||
for i in comment name C ST L U O CN email srvdays CAdays; do
|
||||
eval "echo -e $i\"$GO_MIDDLE\" \$$i;"
|
||||
done
|
||||
|
||||
|
||||
openssl=$r/usr/bin/openssl
|
||||
sslcrtdir=$r/etc/apache2/ssl.crt
|
||||
sslcsrdir=$r/etc/apache2/ssl.csr
|
||||
sslkeydir=$r/etc/apache2/ssl.key
|
||||
sslprmdir=$r/etc/apache2/ssl.prm
|
||||
|
||||
#
|
||||
# CA
|
||||
#
|
||||
echo;myecho creating CA key ...
|
||||
$openssl genrsa -rand $r/var/log/y2log:$r/var/log/messages -out $sslkeydir/${name}ca.key 2048 || myexit $LINENO $?
|
||||
|
||||
cat >$r/root/.mkcert.cfg <<EOT
|
||||
[ req ]
|
||||
default_bits = 1024
|
||||
default_keyfile = keyfile.pem
|
||||
distinguished_name = req_distinguished_name
|
||||
attributes = req_attributes
|
||||
prompt = no
|
||||
output_password = mypass
|
||||
|
||||
[ req_distinguished_name ]
|
||||
C = $C
|
||||
ST = $ST
|
||||
L = $L
|
||||
O = $O
|
||||
OU = CA
|
||||
CN = $CN
|
||||
emailAddress = $email
|
||||
|
||||
[ req_attributes ]
|
||||
challengePassword = $RANDOM$RANDOMA challenge password
|
||||
EOT
|
||||
|
||||
echo;myecho creating CA request/certificate ...
|
||||
$openssl req -config $r/root/.mkcert.cfg -new -x509 -days $CAdays -key $sslkeydir/${name}ca.key -out $sslcrtdir/${name}ca.crt || myexit $LINENO $?
|
||||
|
||||
cp -pv $sslcrtdir/${name}ca.crt $r/srv/www/htdocs/$(echo $name | tr 'a-z' 'A-Z')CA.crt
|
||||
|
||||
#
|
||||
# Server CERT
|
||||
#
|
||||
echo;myecho creating server key ...
|
||||
$openssl genrsa -rand $r/etc/rc.config:$r/var/log/messages -out $sslkeydir/${name}server.key 1024 || myexit $LINENO $?
|
||||
|
||||
cat >$r/root/.mkcert.cfg <<EOT
|
||||
[ req ]
|
||||
default_bits = 1024
|
||||
default_keyfile = keyfile.pem
|
||||
distinguished_name = req_distinguished_name
|
||||
attributes = req_attributes
|
||||
prompt = no
|
||||
output_password = mypass
|
||||
|
||||
[ req_distinguished_name ]
|
||||
C = $C
|
||||
ST = $ST
|
||||
L = $L
|
||||
O = $O
|
||||
OU = $U
|
||||
CN = $CN
|
||||
emailAddress = $email
|
||||
|
||||
[ req_attributes ]
|
||||
challengePassword = $RANDOM$RANDOMA challenge password
|
||||
EOT
|
||||
|
||||
echo;myecho creating server request ...
|
||||
$openssl req -config $r/root/.mkcert.cfg -new -key $sslkeydir/${name}server.key -out $sslcsrdir/${name}server.csr || myexit $LINENO $?
|
||||
|
||||
|
||||
cat >$r/root/.mkcert.cfg <<EOT
|
||||
extensions = x509v3
|
||||
[ x509v3 ]
|
||||
subjectAltName = email:copy
|
||||
nsComment = $comment
|
||||
nsCertType = server
|
||||
EOT
|
||||
|
||||
|
||||
test -f $r/root/.mkcert.serial || echo 01 >$r/root/.mkcert.serial
|
||||
myecho "creating server certificate ..."
|
||||
$openssl x509 \
|
||||
-extfile $r/root/.mkcert.cfg \
|
||||
-days $srvdays \
|
||||
-CAserial $r/root/.mkcert.serial \
|
||||
-CA $sslcrtdir/${name}ca.crt \
|
||||
-CAkey $sslkeydir/${name}ca.key \
|
||||
-in $sslcsrdir/${name}server.csr -req \
|
||||
-out $sslcrtdir/${name}server.crt || myexit $LINENO $?
|
||||
|
||||
rm -f $r/root/.mkcert.cfg
|
||||
|
||||
|
||||
|
||||
|
||||
echo;myecho "Verify: matching certificate & key modulus"
|
||||
modcrt=`$openssl x509 -noout -modulus -in $sslcrtdir/${name}server.crt | sed -e 's;.*Modulus=;;' || myexit $LINENO $?`
|
||||
modkey=`$openssl rsa -noout -modulus -in $sslkeydir/${name}server.key | sed -e 's;.*Modulus=;;' || myexit $LINENO $?`
|
||||
|
||||
if [ ".$modcrt" != ".$modkey" ]; then
|
||||
error "mkcert.sh:Error: Failed to verify modulus on resulting X.509 certificate" 1>&2
|
||||
myexit $LINENO $?
|
||||
fi
|
||||
|
||||
echo;myecho Verify: matching certificate signature
|
||||
$openssl verify -CAfile $sslcrtdir/${name}ca.crt $sslcrtdir/${name}server.crt || myexit $LINENO $?
|
||||
if [ $? -ne 0 ]; then
|
||||
error "mkcert.sh:Error: Failed to verify signature on resulting X.509 certificate" 1>&2
|
||||
myexit $LINENO $?
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
45
get_includes
Normal file
45
get_includes
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
pname=apache2
|
||||
: ${sysconfdir:=/etc/$pname}
|
||||
: ${sysconfig_apache:=/etc/sysconfig/$pname}
|
||||
|
||||
test -z "$APACHE_MODULES" && . /usr/share/$pname/load_configuration
|
||||
apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
|
||||
APACHE_MPM=${apache_bin##*-}
|
||||
if [ -z "$APACHE_MPM" ]; then
|
||||
echo >&2 Warning: no MPM found. Some modules are dependant on the type of MPM.
|
||||
fi
|
||||
|
||||
#echo -n writing sysconfig.d/include.conf
|
||||
exec 3>$sysconfdir/sysconfig.d/include.conf
|
||||
echo >&3 "#
|
||||
# This file is created at apache start time by /usr/sbin/rc$pname. Do not edit it!
|
||||
#
|
||||
|
||||
# as listed in APACHE_INCLUDE_* ($sysconfig_apache)
|
||||
"
|
||||
for file in $APACHE_CONF_INCLUDE_FILES; do
|
||||
test ${file:0:1} = / || file=$sysconfdir/$file
|
||||
if [ -e $file ]; then
|
||||
echo >&3 Include $file
|
||||
else
|
||||
echo >&2 File $file from APACHE_CONF_INCLUDE_FILES not found. Ignored.
|
||||
fi
|
||||
done
|
||||
|
||||
# here, we do not want to use globbing. apache will do it
|
||||
set -o noglob
|
||||
for dir in $APACHE_CONF_INCLUDE_DIRS; do
|
||||
test ${dir:0:1} = / || dir=$sysconfdir/$dir
|
||||
if [ -d $dir -o -d /$(dirname $dir) ]; then
|
||||
echo >&3 Include $dir
|
||||
else
|
||||
echo >&2 Directory $dir from APACHE_CONF_INCLUDE_DIRS not found. Ignored.
|
||||
fi
|
||||
done
|
||||
set +o noglob
|
||||
|
||||
echo >&3 -e "#\n"
|
||||
exec 3<&-
|
||||
#echo -n ". "
|
150
get_module_list
Normal file
150
get_module_list
Normal file
@ -0,0 +1,150 @@
|
||||
#!/bin/bash
|
||||
|
||||
pname=apache2
|
||||
: ${sysconfdir:=/etc/$pname}
|
||||
: ${sysconfig_apache:=/etc/sysconfig/$pname}
|
||||
default_APACHE_DOCUMENT_ROOT=/srv/www/htdocs
|
||||
|
||||
test -z "$APACHE_MODULES" && . /usr/share/$pname/load_configuration
|
||||
apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
|
||||
APACHE_MPM=${apache_bin##*-}
|
||||
if [ -z "$APACHE_MPM" ]; then
|
||||
echo >&2 Warning: no MPM found. Some modules are dependant on the type of MPM.
|
||||
fi
|
||||
|
||||
if [ "$1" = -q ]; then
|
||||
quiet=true
|
||||
else
|
||||
quiet=false
|
||||
fi
|
||||
|
||||
#echo -n writing sysconfig.d/loadmodule.conf
|
||||
exec 3>$sysconfdir/sysconfig.d/loadmodule.conf
|
||||
echo >&3 "#
|
||||
# Files in this directory are created at apache start time by /usr/sbin/rc$pname
|
||||
# Do not edit them!
|
||||
#
|
||||
|
||||
# as listed in APACHE_MODULES ($sysconfig_apache)
|
||||
"
|
||||
test -z "$APACHE_MODULES" && APACHE_MODULES=$LOADMODULES
|
||||
# see whether APACHE_MODULES is declared as array (it was so, in the past)
|
||||
# if it is not an array, we convert it to one.
|
||||
if [[ -z ${APACHE_MODULES[1]} ]]; then
|
||||
# strip leading and trailing parens... since it might erroneously be written as
|
||||
# APACHE_MODULES="(asdf 1234)"
|
||||
APACHE_MODULES=${APACHE_MODULES/(}; APACHE_MODULES=${APACHE_MODULES/)}
|
||||
APACHE_MODULES=($APACHE_MODULES)
|
||||
fi
|
||||
|
||||
for i in ${APACHE_MODULES[*]}; do
|
||||
unset module_path module_id
|
||||
case $i in mod_cgid|cgid) case $APACHE_MPM in prefork|leader) i=${i%d};; esac;; esac
|
||||
case $i in mod_cgi|cgi) case $APACHE_MPM in event|worker) i=${i}d;; esac;; esac
|
||||
|
||||
module_id=${i##*/}
|
||||
module_id=${module_id#mod_}
|
||||
module_id=${module_id#lib}
|
||||
module_id=${module_id%.so}_module
|
||||
|
||||
# special case
|
||||
case $module_id in auth_mysql_module) module_id=mysql_auth_module;; esac
|
||||
|
||||
case $i in
|
||||
/*)
|
||||
module_path=$i
|
||||
;;
|
||||
*)
|
||||
for j in /usr/lib/$pname-$APACHE_MPM/mod_$i.so \
|
||||
/usr/lib/$pname-$APACHE_MPM/$i.so \
|
||||
/usr/lib/$pname-$APACHE_MPM/mod_$i \
|
||||
/usr/lib/$pname-$APACHE_MPM/$i \
|
||||
/usr/lib/$pname-$APACHE_MPM/${i/mod_}.so \
|
||||
/usr/lib/$pname-$APACHE_MPM/${i/mod_} \
|
||||
/usr/lib/$pname-$APACHE_MPM/lib${i/mod_}.so \
|
||||
/usr/lib/$pname-$APACHE_MPM/lib${i/mod_} \
|
||||
/usr/lib/$pname-$APACHE_MPM/lib$i.so \
|
||||
/usr/lib/$pname-$APACHE_MPM/lib$i \
|
||||
/usr/lib/$pname/mod_$i.so \
|
||||
/usr/lib/$pname/$i.so \
|
||||
/usr/lib/$pname/mod_$i \
|
||||
/usr/lib/$pname/$i \
|
||||
/usr/lib/$pname/${i/mod_}.so \
|
||||
/usr/lib/$pname/${i/mod_} \
|
||||
/usr/lib/$pname/lib${i/mod_}.so \
|
||||
/usr/lib/$pname/lib${i/mod_} \
|
||||
/usr/lib/$pname/lib$i.so \
|
||||
/usr/lib/$pname/lib$i
|
||||
do
|
||||
if [ -f $j ]; then
|
||||
module_path=$j
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -f $module_path ]]; then
|
||||
printf "LoadModule %-30s %s\n" $module_id $module_path >&3
|
||||
else
|
||||
# print a warning?
|
||||
# php modules are in the list by default, so we don't warn about it [#66729]
|
||||
if ! $quiet && [ $i != "php4" -a $i != "php5" ]; then
|
||||
echo >&2 "Module \"$i\" is not installed, ignoring."
|
||||
echo >&2 "Check the APACHE_MODULES setting in /etc/sysconfig/$pname."
|
||||
fi
|
||||
|
||||
fi
|
||||
done
|
||||
echo >&3 -e "#\n"
|
||||
exec 3<&-
|
||||
#echo -n ". "
|
||||
|
||||
|
||||
#echo -n writing sysconfig.d/global.conf
|
||||
exec 3>$sysconfdir/sysconfig.d/global.conf
|
||||
echo >&3 "#
|
||||
# Files in this directory are created at apache start time by /usr/sbin/rc$pname
|
||||
# Do not edit them!
|
||||
#
|
||||
|
||||
# see $sysconfig_apache
|
||||
"
|
||||
|
||||
if [[ -n $APACHE_DOCUMENT_ROOT ]]; then
|
||||
echo >&3 "DocumentRoot $APACHE_DOCUMENT_ROOT"
|
||||
# else
|
||||
# if ! grep -q "^DocumentRoot" $sysconfdir/httpd.conf 2>/dev/null; then
|
||||
# echo >&3 "DocumentRoot $default_APACHE_DOCUMENT_ROOT"
|
||||
# fi
|
||||
fi
|
||||
|
||||
[[ -n $APACHE_TIMEOUT ]] && echo >&3 "Timeout $APACHE_TIMEOUT"
|
||||
if [[ -n $APACHE_SERVERSIGNATURE ]]; then
|
||||
case $APACHE_SERVERSIGNATURE in
|
||||
no) APACHE_SERVERSIGNATURE=off;;
|
||||
yes) APACHE_SERVERSIGNATURE=on;;
|
||||
esac
|
||||
echo >&3 "ServerSignature $APACHE_SERVERSIGNATURE"
|
||||
fi
|
||||
[[ -n $APACHE_SERVERADMIN ]] && echo >&3 "ServerAdmin $APACHE_SERVERADMIN"
|
||||
[[ -n $APACHE_SERVERNAME ]] && echo >&3 "ServerName $APACHE_SERVERNAME"
|
||||
[[ -n $APACHE_USE_CANONICAL_NAME ]] && echo >&3 "UseCanonicalName $APACHE_USE_CANONICAL_NAME"
|
||||
[[ -n $APACHE_SERVERTOKENS ]] && echo >&3 "ServerTokens $APACHE_SERVERTOKENS"
|
||||
[[ $APACHE_EXTENDED_STATUS = on ]] && echo -e >&3 "<IfModule mod_status.c>\n ExtendedStatus on\n</IfModule>"
|
||||
[[ $APACHE_BUFFERED_LOGS = on ]] && echo >&3 "BufferedLogs on"
|
||||
[[ -n $APACHE_LOGLEVEL ]] && echo >&3 "LogLevel $APACHE_LOGLEVEL"
|
||||
if [[ -n $APACHE_ACCESS_LOG ]]; then
|
||||
# split multiple entries
|
||||
APACHE_ACCESS_LOG=($APACHE_ACCESS_LOG)
|
||||
for ((i=0; $i<${#APACHE_ACCESS_LOG[*]}; i=i+2)); do
|
||||
filename=${APACHE_ACCESS_LOG[$i]}
|
||||
format=${APACHE_ACCESS_LOG[$i+1]}
|
||||
echo >&3 "CustomLog $filename ${format/%,}"
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
exec 3<&-
|
||||
#echo -n ". "
|
||||
|
36
httpd-2.0.49-log_server_status.dif
Normal file
36
httpd-2.0.49-log_server_status.dif
Normal file
@ -0,0 +1,36 @@
|
||||
--- httpd-2.0.49.orig/support/log_server_status.in 2004-02-09 21:59:49.000000000 +0100
|
||||
+++ httpd-2.0.49/support/log_server_status2 2004-06-18 11:34:37.000000000 +0200
|
||||
@@ -24,18 +24,18 @@
|
||||
# it to a file. Make sure the directory $wherelog is writable by the
|
||||
# user who runs this script.
|
||||
#
|
||||
-require 'sys/socket.ph';
|
||||
+use Socket;
|
||||
|
||||
-$wherelog = "/var/log/graph/"; # Logs will be like "/var/log/graph/19960312"
|
||||
+$wherelog = "/var/log/apache2/status/"; # Logs will be like "/var/log/apache2/status/19960312"
|
||||
$server = "localhost"; # Name of server, could be "www.foo.com"
|
||||
$port = "80"; # Port on server
|
||||
-$request = "/status/?auto"; # Request to send
|
||||
+$request = "/server-status/?auto"; # Request to send
|
||||
|
||||
sub tcp_connect
|
||||
{
|
||||
local($host,$port) =@_;
|
||||
$sockaddr='S n a4 x8';
|
||||
- chop($hostname=`hostname`);
|
||||
+ chop($hostname='localhost');
|
||||
$port=(getservbyname($port, 'tcp'))[2] unless $port =~ /^\d+$/;
|
||||
$me=pack($sockaddr,&AF_INET,0,(gethostbyname($hostname))[4]);
|
||||
$them=pack($sockaddr,&AF_INET,$port,(gethostbyname($host))[4]);
|
||||
@@ -66,8 +66,8 @@
|
||||
}
|
||||
print S "GET $request\n";
|
||||
while (<S>) {
|
||||
- $requests=$1 if ( m|^BusyServers:\ (\S+)|);
|
||||
- $idle=$1 if ( m|^IdleServers:\ (\S+)|);
|
||||
+ $requests=$1 if ( m|^BusyWorkers:\ (\S+)|);
|
||||
+ $idle=$1 if ( m|^IdleWorkers:\ (\S+)|);
|
||||
$number=$1 if ( m|sses:\ (\S+)|);
|
||||
$cpu=$1 if (m|^CPULoad:\ (\S+)|);
|
||||
}
|
11
httpd-2.0.54-envvars.dif
Normal file
11
httpd-2.0.54-envvars.dif
Normal file
@ -0,0 +1,11 @@
|
||||
diff -uNr httpd-2.0.54.orig/support/envvars-std.in httpd-2.0.54/support/envvars-std.in
|
||||
--- httpd-2.0.54.orig/support/envvars-std.in 2005-02-04 21:21:18.000000000 +0100
|
||||
+++ httpd-2.0.54/support/envvars-std.in 2005-10-07 13:56:49.223546288 +0200
|
||||
@@ -19,6 +19,7 @@
|
||||
# This file is generated from envvars-std.in
|
||||
#
|
||||
@SHLIBPATH_VAR@="@exp_libdir@:$@SHLIBPATH_VAR@"
|
||||
+@SHLIBPATH_VAR@="@exp_libdir@${@SHLIBPATH_VAR@+:$@SHLIBPATH_VAR@}"
|
||||
export @SHLIBPATH_VAR@
|
||||
#
|
||||
@OS_SPECIFIC_VARS@
|
396
httpd-2.1.3alpha-autoconf-2.59.dif
Normal file
396
httpd-2.1.3alpha-autoconf-2.59.dif
Normal file
@ -0,0 +1,396 @@
|
||||
--- httpd-2.1.3-alpha/acinclude.m4
|
||||
+++ httpd-2.1.3-alpha/acinclude.m4
|
||||
@@ -4,25 +4,25 @@
|
||||
dnl AC_HELP_STRING, so let's try to call it if we can.
|
||||
dnl Note: this define must be on one line so that it can be properly returned
|
||||
dnl as the help string.
|
||||
-AC_DEFUN(APACHE_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl
|
||||
+AC_DEFUN([APACHE_HELP_STRING],[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl
|
||||
|
||||
dnl APACHE_SUBST(VARIABLE)
|
||||
dnl Makes VARIABLE available in generated files
|
||||
dnl (do not use @variable@ in Makefiles, but $(variable))
|
||||
-AC_DEFUN(APACHE_SUBST,[
|
||||
+AC_DEFUN([APACHE_SUBST],[
|
||||
APACHE_VAR_SUBST="$APACHE_VAR_SUBST $1"
|
||||
AC_SUBST($1)
|
||||
])
|
||||
|
||||
dnl APACHE_FAST_OUTPUT(FILENAME)
|
||||
dnl Perform substitutions on FILENAME (Makefiles only)
|
||||
-AC_DEFUN(APACHE_FAST_OUTPUT,[
|
||||
+AC_DEFUN([APACHE_FAST_OUTPUT],[
|
||||
APACHE_FAST_OUTPUT_FILES="$APACHE_FAST_OUTPUT_FILES $1"
|
||||
])
|
||||
|
||||
dnl APACHE_GEN_CONFIG_VARS
|
||||
dnl Creates config_vars.mk
|
||||
-AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
|
||||
+AC_DEFUN([APACHE_GEN_CONFIG_VARS],[
|
||||
APACHE_SUBST(abs_srcdir)
|
||||
APACHE_SUBST(bindir)
|
||||
APACHE_SUBST(sbindir)
|
||||
@@ -109,14 +109,14 @@
|
||||
|
||||
dnl APACHE_GEN_MAKEFILES
|
||||
dnl Creates Makefiles
|
||||
-AC_DEFUN(APACHE_GEN_MAKEFILES,[
|
||||
+AC_DEFUN([APACHE_GEN_MAKEFILES],[
|
||||
$SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $APACHE_FAST_OUTPUT_FILES
|
||||
])
|
||||
|
||||
dnl ## APACHE_OUTPUT(file)
|
||||
dnl ## adds "file" to the list of files generated by AC_OUTPUT
|
||||
dnl ## This macro can be used several times.
|
||||
-AC_DEFUN(APACHE_OUTPUT, [
|
||||
+AC_DEFUN([APACHE_OUTPUT], [
|
||||
APACHE_OUTPUT_FILES="$APACHE_OUTPUT_FILES $1"
|
||||
])
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
dnl
|
||||
dnl If rlim_t is not defined, define it to int
|
||||
dnl
|
||||
-AC_DEFUN(APACHE_TYPE_RLIM_T, [
|
||||
+AC_DEFUN([APACHE_TYPE_RLIM_T], [
|
||||
AC_CACHE_CHECK([for rlim_t], ac_cv_type_rlim_t, [
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
@@ -143,7 +143,7 @@
|
||||
])
|
||||
|
||||
dnl APACHE_MODPATH_INIT(modpath)
|
||||
-AC_DEFUN(APACHE_MODPATH_INIT,[
|
||||
+AC_DEFUN([APACHE_MODPATH_INIT],[
|
||||
current_dir=$1
|
||||
modpath_current=modules/$1
|
||||
modpath_static=
|
||||
@@ -152,7 +152,7 @@
|
||||
> $modpath_current/modules.mk
|
||||
])dnl
|
||||
dnl
|
||||
-AC_DEFUN(APACHE_MODPATH_FINISH,[
|
||||
+AC_DEFUN([APACHE_MODPATH_FINISH],[
|
||||
echo "DISTCLEAN_TARGETS = modules.mk" >> $modpath_current/modules.mk
|
||||
echo "static = $modpath_static" >> $modpath_current/modules.mk
|
||||
echo "shared = $modpath_shared" >> $modpath_current/modules.mk
|
||||
@@ -165,7 +165,7 @@
|
||||
])dnl
|
||||
dnl
|
||||
dnl APACHE_MODPATH_ADD(name[, shared[, objects [, ldflags[, libs]]]])
|
||||
-AC_DEFUN(APACHE_MODPATH_ADD,[
|
||||
+AC_DEFUN([APACHE_MODPATH_ADD],[
|
||||
if test -z "$3"; then
|
||||
objects="mod_$1.lo"
|
||||
else
|
||||
@@ -209,7 +209,7 @@
|
||||
dnl setting. otherwise, fall under the "all" setting.
|
||||
dnl explicit yes/no always overrides.
|
||||
dnl
|
||||
-AC_DEFUN(APACHE_MODULE,[
|
||||
+AC_DEFUN([APACHE_MODULE],[
|
||||
AC_MSG_CHECKING(whether to enable mod_$1)
|
||||
define([optname],[--]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl
|
||||
AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),,enable_$1=ifelse($5,,maybe-all,$5))
|
||||
@@ -282,7 +282,7 @@
|
||||
dnl
|
||||
dnl APACHE_ENABLE_MODULES
|
||||
dnl
|
||||
-AC_DEFUN(APACHE_ENABLE_MODULES,[
|
||||
+AC_DEFUN([APACHE_ENABLE_MODULES],[
|
||||
module_selection=default
|
||||
module_default=yes
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
])
|
||||
])
|
||||
|
||||
-AC_DEFUN(APACHE_REQUIRE_CXX,[
|
||||
+AC_DEFUN([APACHE_REQUIRE_CXX],[
|
||||
if test -z "$apache_cxx_done"; then
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
@@ -326,7 +326,7 @@
|
||||
dnl Configure for the detected openssl/ssl-c toolkit installation, giving
|
||||
dnl preference to "--with-ssl=<path>" if it was specified.
|
||||
dnl
|
||||
-AC_DEFUN(APACHE_CHECK_SSL_TOOLKIT,[
|
||||
+AC_DEFUN([APACHE_CHECK_SSL_TOOLKIT],[
|
||||
if test "x$ap_ssltk_configured" = "x"; then
|
||||
dnl initialise the variables we use
|
||||
ap_ssltk_base=""
|
||||
@@ -499,14 +499,14 @@
|
||||
dnl apache will use while generating scripts like autoconf and apxs and
|
||||
dnl the default config file.
|
||||
|
||||
-AC_DEFUN(APACHE_SUBST_EXPANDED_ARG,[
|
||||
+AC_DEFUN([APACHE_SUBST_EXPANDED_ARG],[
|
||||
APR_EXPAND_VAR(exp_$1, [$]$1)
|
||||
APACHE_SUBST(exp_$1)
|
||||
APR_PATH_RELATIVE(rel_$1, [$]exp_$1, ${prefix})
|
||||
APACHE_SUBST(rel_$1)
|
||||
])
|
||||
|
||||
-AC_DEFUN(APACHE_EXPORT_ARGUMENTS,[
|
||||
+AC_DEFUN([APACHE_EXPORT_ARGUMENTS],[
|
||||
APACHE_SUBST_EXPANDED_ARG(exec_prefix)
|
||||
APACHE_SUBST_EXPANDED_ARG(bindir)
|
||||
APACHE_SUBST_EXPANDED_ARG(sbindir)
|
||||
--- httpd-2.1.3-alpha/build/apr_common.m4
|
||||
+++ httpd-2.1.3-alpha/build/apr_common.m4
|
||||
@@ -22,7 +22,7 @@
|
||||
dnl
|
||||
dnl Saves a snapshot of the configure command-line for later reuse
|
||||
dnl
|
||||
-AC_DEFUN(APR_CONFIG_NICE,[
|
||||
+AC_DEFUN([APR_CONFIG_NICE],[
|
||||
rm -f $1
|
||||
cat >$1<<EOF
|
||||
#! /bin/sh
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
dnl APR_MKDIR_P_CHECK(fallback-mkdir-p)
|
||||
dnl checks whether mkdir -p works
|
||||
-AC_DEFUN(APR_MKDIR_P_CHECK,[
|
||||
+AC_DEFUN([APR_MKDIR_P_CHECK],[
|
||||
AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
|
||||
test -d conftestdir && rm -rf conftestdir
|
||||
mkdir -p conftestdir/somedir >/dev/null 2>&1
|
||||
@@ -112,7 +112,7 @@
|
||||
dnl Trying to optimize this is left as an exercise to the reader who wants
|
||||
dnl to put up with more autoconf craziness. I give up.
|
||||
dnl
|
||||
-AC_DEFUN(APR_SUBDIR_CONFIG, [
|
||||
+AC_DEFUN([APR_SUBDIR_CONFIG], [
|
||||
# save our work to this point; this allows the sub-package to use it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
dnl
|
||||
dnl Stores the variable (usually a Makefile macro) for later restoration
|
||||
dnl
|
||||
-AC_DEFUN(APR_SAVE_THE_ENVIRONMENT,[
|
||||
+AC_DEFUN([APR_SAVE_THE_ENVIRONMENT],[
|
||||
apr_ste_save_$1="$$1"
|
||||
])dnl
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
dnl and restoring the original variable contents. This makes it possible
|
||||
dnl for a user to override configure when it does something stupid.
|
||||
dnl
|
||||
-AC_DEFUN(APR_RESTORE_THE_ENVIRONMENT,[
|
||||
+AC_DEFUN([APR_RESTORE_THE_ENVIRONMENT],[
|
||||
if test "x$apr_ste_save_$1" = "x"; then
|
||||
$2$1="$$1"
|
||||
$1=
|
||||
@@ -216,7 +216,7 @@
|
||||
dnl
|
||||
dnl Set variable iff it's currently null
|
||||
dnl
|
||||
-AC_DEFUN(APR_SETIFNULL,[
|
||||
+AC_DEFUN([APR_SETIFNULL],[
|
||||
if test -z "$$1"; then
|
||||
test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
|
||||
$1="$2"
|
||||
@@ -228,7 +228,7 @@
|
||||
dnl
|
||||
dnl Set variable no matter what
|
||||
dnl
|
||||
-AC_DEFUN(APR_SETVAR,[
|
||||
+AC_DEFUN([APR_SETVAR],[
|
||||
test "x$silent" != "xyes" && echo " forcing $1 to \"$2\""
|
||||
$1="$2"
|
||||
])dnl
|
||||
@@ -238,7 +238,7 @@
|
||||
dnl
|
||||
dnl Add value to variable
|
||||
dnl
|
||||
-AC_DEFUN(APR_ADDTO,[
|
||||
+AC_DEFUN([APR_ADDTO],[
|
||||
if test "x$$1" = "x"; then
|
||||
test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
|
||||
$1="$2"
|
||||
@@ -265,7 +265,7 @@
|
||||
dnl
|
||||
dnl Remove a value from a variable
|
||||
dnl
|
||||
-AC_DEFUN(APR_REMOVEFROM,[
|
||||
+AC_DEFUN([APR_REMOVEFROM],[
|
||||
if test "x$$1" = "x$2"; then
|
||||
test "x$silent" != "xyes" && echo " nulling $1"
|
||||
$1=""
|
||||
@@ -289,7 +289,7 @@
|
||||
dnl
|
||||
dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] )
|
||||
dnl
|
||||
-AC_DEFUN(APR_CHECK_DEFINE_FILES,[
|
||||
+AC_DEFUN([APR_CHECK_DEFINE_FILES],[
|
||||
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
|
||||
ac_cv_define_$1=no
|
||||
for curhdr in $2
|
||||
@@ -311,7 +311,7 @@
|
||||
dnl
|
||||
dnl APR_CHECK_DEFINE(symbol, header_file)
|
||||
dnl
|
||||
-AC_DEFUN(APR_CHECK_DEFINE,[
|
||||
+AC_DEFUN([APR_CHECK_DEFINE],[
|
||||
AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
|
||||
AC_EGREP_CPP(YES_IS_DEFINED, [
|
||||
#include <$2>
|
||||
@@ -328,7 +328,7 @@
|
||||
dnl
|
||||
dnl APR_CHECK_APR_DEFINE( symbol )
|
||||
dnl
|
||||
-AC_DEFUN(APR_CHECK_APR_DEFINE,[
|
||||
+AC_DEFUN([APR_CHECK_APR_DEFINE],[
|
||||
apr_old_cppflags=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS $INCLUDES"
|
||||
AC_EGREP_CPP(YES_IS_DEFINED, [
|
||||
@@ -353,7 +353,7 @@
|
||||
fi])
|
||||
])
|
||||
|
||||
-define(APR_IFALLYES,[dnl
|
||||
+define([APR_IFALLYES],[dnl
|
||||
ac_rc=yes
|
||||
for ac_spec in $1; do
|
||||
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
|
||||
@@ -405,7 +405,7 @@
|
||||
])
|
||||
|
||||
|
||||
-define(APR_DECISION_OVERRIDE,[dnl
|
||||
+define([APR_DECISION_OVERRIDE],[dnl
|
||||
ac_decision=''
|
||||
for ac_item in $1; do
|
||||
eval "ac_decision_this=\$ac_decision_${ac_item}"
|
||||
@@ -417,13 +417,13 @@
|
||||
])
|
||||
|
||||
|
||||
-define(APR_DECISION_FORCE,[dnl
|
||||
+define([APR_DECISION_FORCE],[dnl
|
||||
ac_decision="$1"
|
||||
eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\""
|
||||
])
|
||||
|
||||
|
||||
-define(APR_END_DECISION,[dnl
|
||||
+define([APR_END_DECISION],[dnl
|
||||
if test ".$ac_decision" = .; then
|
||||
echo "[$]0:Error: decision on $ac_decision_item failed" 1>&2
|
||||
exit 1
|
||||
@@ -443,7 +443,7 @@
|
||||
dnl A variant of AC_CHECK_SIZEOF which allows the checking of
|
||||
dnl sizes of non-builtin types
|
||||
dnl
|
||||
-AC_DEFUN(APR_CHECK_SIZEOF_EXTENDED,
|
||||
+AC_DEFUN([APR_CHECK_SIZEOF_EXTENDED],
|
||||
[changequote(<<,>>)dnl
|
||||
dnl The name to #define
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
|
||||
@@ -515,7 +515,7 @@
|
||||
dnl string.
|
||||
dnl
|
||||
dnl
|
||||
-AC_DEFUN(APR_CHECK_STRERROR_R_RC,[
|
||||
+AC_DEFUN([APR_CHECK_STRERROR_R_RC],[
|
||||
AC_MSG_CHECKING(for type of return code from strerror_r)
|
||||
AC_TRY_RUN([
|
||||
#include <errno.h>
|
||||
@@ -550,7 +550,7 @@
|
||||
dnl structure on this platform. Single UNIX Spec says d_ino,
|
||||
dnl BSD uses d_fileno. Undef to find the real beast.
|
||||
dnl
|
||||
-AC_DEFUN(APR_CHECK_DIRENT_INODE, [
|
||||
+AC_DEFUN([APR_CHECK_DIRENT_INODE], [
|
||||
AC_CACHE_CHECK([for inode member of struct dirent], apr_cv_dirent_inode, [
|
||||
apr_cv_dirent_inode=no
|
||||
AC_TRY_COMPILE([
|
||||
@@ -588,7 +588,7 @@
|
||||
dnl Note that this is worthless without DT_xxx macros, so
|
||||
dnl look for one while we are at it.
|
||||
dnl
|
||||
-AC_DEFUN(APR_CHECK_DIRENT_TYPE,[
|
||||
+AC_DEFUN([APR_CHECK_DIRENT_TYPE],[
|
||||
AC_CACHE_CHECK([for file type member of struct dirent], apr_cv_dirent_type,[
|
||||
apr_cv_dirent_type=no
|
||||
AC_TRY_COMPILE([
|
||||
@@ -637,7 +637,7 @@
|
||||
dnl all "." and "-" chars. If the 3rd parameter is "yes" then instead of
|
||||
dnl setting to 1 or 0, we set FLAG-TO-SET to yes or no.
|
||||
dnl
|
||||
-AC_DEFUN(APR_FLAG_HEADERS,[
|
||||
+AC_DEFUN([APR_FLAG_HEADERS],[
|
||||
AC_CHECK_HEADERS($1)
|
||||
for aprt_i in $1
|
||||
do
|
||||
@@ -658,7 +658,7 @@
|
||||
dnl is "yes" then instead of setting to 1 or 0, we set FLAG-TO-SET
|
||||
dnl to yes or no.
|
||||
dnl
|
||||
-AC_DEFUN(APR_FLAG_FUNCS,[
|
||||
+AC_DEFUN([APR_FLAG_FUNCS],[
|
||||
AC_CHECK_FUNCS($1)
|
||||
for aprt_j in $1
|
||||
do
|
||||
@@ -683,7 +683,7 @@
|
||||
dnl APR_EXPAND_VAR(fraz, $baz)
|
||||
dnl $fraz is now "1/2/3"
|
||||
dnl
|
||||
-AC_DEFUN(APR_EXPAND_VAR,[
|
||||
+AC_DEFUN([APR_EXPAND_VAR],[
|
||||
ap_last=
|
||||
ap_cur="$2"
|
||||
while test "x${ap_cur}" != "x${ap_last}";
|
||||
@@ -702,7 +702,7 @@
|
||||
dnl orig_path="${prefix}/bar"
|
||||
dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
|
||||
dnl $final_path now contains "bar"
|
||||
-AC_DEFUN(APR_PATH_RELATIVE,[
|
||||
+AC_DEFUN([APR_PATH_RELATIVE],[
|
||||
ap_stripped=`echo $2 | sed -e "s#^$3##"`
|
||||
# check if the stripping was successful
|
||||
if test "x$2" != "x${ap_stripped}"; then
|
||||
@@ -720,12 +720,12 @@
|
||||
dnl Note: this define must be on one line so that it can be properly returned
|
||||
dnl as the help string. When using this macro with a multi-line RHS, ensure
|
||||
dnl that you surround the macro invocation with []s
|
||||
-AC_DEFUN(APR_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
|
||||
+AC_DEFUN([APR_HELP_STRING],[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
|
||||
|
||||
dnl
|
||||
dnl APR_LAYOUT(configlayout, layoutname [, extravars])
|
||||
dnl
|
||||
-AC_DEFUN(APR_LAYOUT,[
|
||||
+AC_DEFUN([APR_LAYOUT],[
|
||||
if test ! -f $srcdir/config.layout; then
|
||||
echo "** Error: Layout file $srcdir/config.layout not found"
|
||||
echo "** Error: Cannot use undefined layout '$LAYOUT'"
|
||||
@@ -781,7 +781,7 @@
|
||||
dnl
|
||||
dnl APR_ENABLE_LAYOUT(default layout name [, extra vars])
|
||||
dnl
|
||||
-AC_DEFUN(APR_ENABLE_LAYOUT,[
|
||||
+AC_DEFUN([APR_ENABLE_LAYOUT],[
|
||||
AC_ARG_ENABLE(layout,
|
||||
[ --enable-layout=LAYOUT],[
|
||||
LAYOUT=$enableval
|
||||
@@ -802,7 +802,7 @@
|
||||
dnl a reimplementation of autoconf's argument parser,
|
||||
dnl used here to allow us to co-exist layouts and argument based
|
||||
dnl set ups.
|
||||
-AC_DEFUN(APR_PARSE_ARGUMENTS,[
|
||||
+AC_DEFUN([APR_PARSE_ARGUMENTS],[
|
||||
ac_prev=
|
||||
for ac_option
|
||||
do
|
||||
@@ -924,7 +924,7 @@
|
||||
dnl
|
||||
dnl Determine what program we can use to generate .deps-style dependencies
|
||||
dnl
|
||||
-AC_DEFUN(APR_CHECK_DEPEND,[
|
||||
+AC_DEFUN([APR_CHECK_DEPEND],[
|
||||
dnl Try to determine what depend program we can use
|
||||
dnl All GCC-variants should have -MM.
|
||||
dnl If not, then we can check on those, too.
|
57
httpd-2.1.3alpha-layout.dif
Normal file
57
httpd-2.1.3alpha-layout.dif
Normal file
@ -0,0 +1,57 @@
|
||||
--- httpd-2.1.3-alpha.orig/config.layout
|
||||
+++ httpd-2.1.3-alpha/config.layout
|
||||
@@ -202,6 +202,54 @@
|
||||
proxycachedir: /var/cache/httpd
|
||||
</Layout>
|
||||
|
||||
+# SuSE >= 8.1 layout (32 bit system)
|
||||
+<Layout SuSE81>
|
||||
+ prefix: /srv/www
|
||||
+ exec_prefix: /usr
|
||||
+ bindir: ${exec_prefix}/bin
|
||||
+ sbindir: ${exec_prefix}/sbin
|
||||
+ libdir: ${exec_prefix}/lib
|
||||
+ libexecdir: ${exec_prefix}/lib/apache2${mpm_suffix}
|
||||
+ mandir: ${exec_prefix}/share/man
|
||||
+ sysconfdir: /etc/apache2
|
||||
+ datadir: ${prefix}
|
||||
+ installbuilddir: ${exec_prefix}/share/apache2/build
|
||||
+ errordir: ${exec_prefix}/share/apache2/error
|
||||
+ iconsdir: ${exec_prefix}/share/apache2/icons
|
||||
+ htdocsdir: ${datadir}/htdocs
|
||||
+ manualdir: ${exec_prefix}/share/apache2/manual
|
||||
+ cgidir: ${datadir}/cgi-bin
|
||||
+ includedir: ${exec_prefix}/include/apache2${mpm_suffix}
|
||||
+ localstatedir: /var/lib/apache2
|
||||
+ runtimedir: /var/run
|
||||
+ logfiledir: /var/log/apache2
|
||||
+ proxycachedir: /var/cache/apache2
|
||||
+</Layout>
|
||||
+
|
||||
+# SuSE >= 8.1 layout (64 bit system)
|
||||
+<Layout SuSE81_64>
|
||||
+ prefix: /srv/www
|
||||
+ exec_prefix: /usr
|
||||
+ bindir: ${exec_prefix}/bin
|
||||
+ sbindir: ${exec_prefix}/sbin
|
||||
+ libdir: ${exec_prefix}/lib64
|
||||
+ libexecdir: ${exec_prefix}/lib64/apache2${mpm_suffix}
|
||||
+ mandir: ${exec_prefix}/share/man
|
||||
+ sysconfdir: /etc/apache2
|
||||
+ datadir: ${prefix}
|
||||
+ installbuilddir: ${exec_prefix}/share/apache2/build
|
||||
+ errordir: ${exec_prefix}/share/apache2/error
|
||||
+ iconsdir: ${exec_prefix}/share/apache2/icons
|
||||
+ htdocsdir: ${datadir}/htdocs
|
||||
+ manualdir: ${exec_prefix}/share/apache2/manual
|
||||
+ cgidir: ${datadir}/cgi-bin
|
||||
+ includedir: ${exec_prefix}/include/apache2${mpm_suffix}
|
||||
+ localstatedir: /var/lib/apache2
|
||||
+ runtimedir: /var/run
|
||||
+ logfiledir: /var/log/apache2
|
||||
+ proxycachedir: /var/cache/apache2
|
||||
+</Layout>
|
||||
+
|
||||
# BSD/OS layout
|
||||
<Layout BSDI>
|
||||
prefix: /var/www
|
65
httpd-2.1.9-apachectl.dif
Normal file
65
httpd-2.1.9-apachectl.dif
Normal file
@ -0,0 +1,65 @@
|
||||
diff -uNr httpd-2.1.3-alpha.orig/support/apachectl.in httpd-2.1.3-alpha/support/apachectl.in
|
||||
--- httpd-2.1.3-alpha.orig/support/apachectl.in 2005-02-04 21:28:49.000000000 +0100
|
||||
+++ httpd-2.1.3-alpha/support/apachectl.in 2005-02-25 02:52:49.203566813 +0100
|
||||
@@ -41,17 +41,32 @@
|
||||
# -------------------- --------------------
|
||||
#
|
||||
# the path to your httpd binary, including options if necessary
|
||||
-HTTPD='@exp_sbindir@/@progname@'
|
||||
+HTTPD='@exp_sbindir@/httpd2'
|
||||
#
|
||||
# pick up any necessary environment variables
|
||||
if test -f @exp_sbindir@/envvars; then
|
||||
. @exp_sbindir@/envvars
|
||||
fi
|
||||
+
|
||||
+pname=apache2
|
||||
+sysconfig_apache=/etc/sysconfig/$pname
|
||||
+sysconfdir=/etc/$pname
|
||||
+
|
||||
+test -s $sysconfig_apache && source $sysconfig_apache
|
||||
+httpd_conf=${APACHE_HTTPD_CONF:-$sysconfdir/httpd.conf}
|
||||
+
|
||||
#
|
||||
# a command that outputs a formatted text version of the HTML at the
|
||||
# url given on the command line. Designed for lynx, however other
|
||||
# programs may work.
|
||||
-LYNX="@LYNX_PATH@ -dump"
|
||||
+
|
||||
+if [ -x "`which w3m`" ]; then
|
||||
+ LYNX="w3m -dump -cols ${COLUMNS:-80}"
|
||||
+elif [ -x "`which lynx`" ]; then
|
||||
+ LYNX="lynx -dump -width=${COLUMNS:-80}"
|
||||
+fi
|
||||
+
|
||||
+
|
||||
#
|
||||
# the URL to your server's mod_status status page. If you do not
|
||||
# have one, then status and fullstatus will not work.
|
||||
@@ -77,7 +92,7 @@
|
||||
|
||||
case $ARGV in
|
||||
start|stop|restart|graceful|graceful-stop)
|
||||
- $HTTPD -k $ARGV
|
||||
+ $HTTPD ${httpd_conf+-f $httpd_conf} -k $ARGV
|
||||
ERROR=$?
|
||||
;;
|
||||
startssl|sslstart|start-SSL)
|
||||
@@ -87,7 +102,7 @@
|
||||
ERROR=2
|
||||
;;
|
||||
configtest)
|
||||
- $HTTPD -t
|
||||
+ $HTTPD ${httpd_conf+-f $httpd_conf} -t
|
||||
ERROR=$?
|
||||
;;
|
||||
status)
|
||||
@@ -97,7 +112,7 @@
|
||||
$LYNX $STATUSURL
|
||||
;;
|
||||
*)
|
||||
- $HTTPD $ARGV
|
||||
+ $HTTPD ${httpd_conf+-f $httpd_conf} $ARGV
|
||||
ERROR=$?
|
||||
esac
|
||||
|
111
httpd-2.2.0-apxs-a2enmod.dif
Normal file
111
httpd-2.2.0-apxs-a2enmod.dif
Normal file
@ -0,0 +1,111 @@
|
||||
diff -uNr httpd-2.2.0.orig/support/apxs.in httpd-2.2.0/support/apxs.in
|
||||
--- httpd-2.2.0.orig/support/apxs.in 2005-06-10 11:18:14.000000000 +0200
|
||||
+++ httpd-2.2.0/support/apxs.in 2005-12-07 11:04:38.337999601 +0100
|
||||
@@ -527,105 +527,14 @@
|
||||
|
||||
# activate module via LoadModule/AddModule directive
|
||||
if ($opt_a or $opt_A) {
|
||||
- if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
|
||||
- error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found");
|
||||
- exit(1);
|
||||
- }
|
||||
-
|
||||
- open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
|
||||
- my $content = join('', <FP>);
|
||||
- close(FP);
|
||||
-
|
||||
- if ($content !~ m|\n#?\s*LoadModule\s+|) {
|
||||
- error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
|
||||
- error("At least one `LoadModule' directive already has to exist.");
|
||||
- exit(1);
|
||||
- }
|
||||
|
||||
my $lmd;
|
||||
my $c = '';
|
||||
$c = '#' if ($opt_A);
|
||||
foreach $lmd (@lmd) {
|
||||
- my $what = $opt_A ? "preparing" : "activating";
|
||||
- if ($content !~ m|\n#?\s*$lmd|) {
|
||||
- # check for open <containers>, so that the new LoadModule
|
||||
- # directive always appears *outside* of an <container>.
|
||||
-
|
||||
- my $before = ($content =~ m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0];
|
||||
-
|
||||
- # the '()=' trick forces list context and the scalar
|
||||
- # assignment counts the number of list members (aka number
|
||||
- # of matches) then
|
||||
- my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg);
|
||||
- my $cntclose = () = ($before =~ m|^\s*</.*$|mg);
|
||||
-
|
||||
- if ($cntopen == $cntclose) {
|
||||
- # fine. Last LoadModule is contextless.
|
||||
- $content =~ s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|s;
|
||||
- }
|
||||
- elsif ($cntopen < $cntclose) {
|
||||
- error('Configuration file is not valid. There are sections'
|
||||
- . ' closed before opened.');
|
||||
- exit(1);
|
||||
- }
|
||||
- else {
|
||||
- # put our cmd after the section containing the last
|
||||
- # LoadModule.
|
||||
- my $found =
|
||||
- $content =~ s!\A ( # string and capture start
|
||||
- (?:(?:
|
||||
- ^\s* # start of conf line with a
|
||||
- (?:[^<]|<[^/]) # directive which does not
|
||||
- # start with '</'
|
||||
-
|
||||
- .*(?:$)\n # rest of the line.
|
||||
- # the '$' is in parentheses
|
||||
- # to avoid misinterpreting
|
||||
- # the string "$\" as
|
||||
- # perl variable.
|
||||
-
|
||||
- )* # catch as much as possible
|
||||
- # of such lines. (including
|
||||
- # zero)
|
||||
-
|
||||
- ^\s*</.*(?:$)\n? # after the above, we
|
||||
- # expect a config line with
|
||||
- # a closing container (</)
|
||||
-
|
||||
- ) {$cntopen} # the whole pattern (bunch
|
||||
- # of lines that end up with
|
||||
- # a closing directive) must
|
||||
- # be repeated $cntopen
|
||||
- # times. That's it.
|
||||
- # Simple, eh? ;-)
|
||||
-
|
||||
- ) # capture end
|
||||
- !$1$c$lmd\n!mx;
|
||||
-
|
||||
- unless ($found) {
|
||||
- error('Configuration file is not valid. There are '
|
||||
- . 'sections opened and not closed.');
|
||||
- exit(1);
|
||||
- }
|
||||
- }
|
||||
- } else {
|
||||
- # replace already existing LoadModule line
|
||||
- $content =~ s|^(.*\n)#?\s*$lmd[^\n]*\n|$1$c$lmd\n|s;
|
||||
- }
|
||||
- $lmd =~ m|LoadModule\s+(.+?)_module.*|;
|
||||
- notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");
|
||||
+ print "activating " . $name . "\n";
|
||||
+ system("a2enmod " . $name);
|
||||
}
|
||||
- if (@lmd) {
|
||||
- if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
|
||||
- print FP $content;
|
||||
- close(FP);
|
||||
- system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
|
||||
- "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
|
||||
- "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
|
||||
- } else {
|
||||
- notice("unable to open configuration file");
|
||||
- }
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
3
httpd-2.2.3.tar.bz2
Normal file
3
httpd-2.2.3.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dd86e8221f9efb85497c46229d0f04237d4e66d293fabe98eb0745166aaf4b6c
|
||||
size 4905728
|
10
load_configuration
Normal file
10
load_configuration
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
: ${sysconfig_apache:=/etc/sysconfig/apache2}
|
||||
|
||||
#
|
||||
# load the configuration, but only if it hasn't been done already
|
||||
#
|
||||
if [ -z "$APACHE_MODULES" ]; then
|
||||
. $sysconfig_apache
|
||||
fi
|
3
mkcert.sh.gz
Normal file
3
mkcert.sh.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:90308cef136bdc2ad7501647a19ab321f9645f34a87bf2c496a334098915eef2
|
||||
size 4601
|
1
permissions.apache2
Normal file
1
permissions.apache2
Normal file
@ -0,0 +1 @@
|
||||
/usr/sbin/suexec2 root:root 4755
|
324
rc.apache2
Normal file
324
rc.apache2
Normal file
@ -0,0 +1,324 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 1996, 1997, 1998 S.u.S.E. GmbH
|
||||
# Copyright (c) 1998, 1999, 2000, 2001 SuSE GmbH
|
||||
# Copyright (c) 2002, 2003 SuSE Linux AG
|
||||
#
|
||||
# Authors: Rolf Haberrecker <rolf@suse.de>, 2001
|
||||
# Peter Poeml <poeml@suse.de>, 2002, 2003, 2004, 2005
|
||||
#
|
||||
#
|
||||
# /etc/init.d/apache2
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: apache2 httpd2
|
||||
# Required-Start: $local_fs $remote_fs $network
|
||||
# X-UnitedLinux-Should-Start: $named $time postgresql sendmail mysql ypclient dhcp radiusd
|
||||
# Required-Stop: $local_fs $remote_fs $network
|
||||
# X-UnitedLinux-Should-Stop:
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Apache 2.2 httpd
|
||||
# Description: Start the httpd daemon Apache
|
||||
### END INIT INFO
|
||||
|
||||
pname=apache2
|
||||
: ${sysconfdir:=/etc/$pname}
|
||||
: ${apache_link:=/usr/sbin/httpd2}
|
||||
: ${sysconfig_apache:=/etc/sysconfig/$pname}
|
||||
: ${pidfile:=/var/run/httpd2.pid}
|
||||
: ${logdir:=/var/log/$pname}
|
||||
: ${homedir:=/var/lib/$pname}
|
||||
|
||||
#
|
||||
# load the configuration
|
||||
#
|
||||
test -s /etc/rc.status && . /etc/rc.status && rc_reset
|
||||
|
||||
. /usr/share/$pname/load_configuration
|
||||
export ${!APACHE_*}
|
||||
|
||||
httpd_conf=${APACHE_HTTPD_CONF:-$sysconfdir/httpd.conf}
|
||||
|
||||
apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
|
||||
|
||||
test -L $apache_link && apache_bin=$(readlink $apache_link)
|
||||
|
||||
if [ -z "$APACHE_MPM" ]; then
|
||||
APACHE_MPM=${apache_bin##*-}
|
||||
fi
|
||||
|
||||
if ! [ -x $apache_bin ]; then
|
||||
echo >&2 ${warn}$apache_bin-$APACHE_MPM is not a valid httpd2 binary.
|
||||
echo >&2 Check your APACHE_MPM setting in /etc/sysconfig/$pname. $norm
|
||||
rc_failed 5
|
||||
rc_status -v1
|
||||
rc_exit
|
||||
fi
|
||||
|
||||
# a proper home should be set, otherwise the server might end up
|
||||
# with HOME=/root and some script might try to use that
|
||||
HOME=$homedir
|
||||
|
||||
get_server_flags()
|
||||
{
|
||||
unset server_flags
|
||||
case "$action" in startssl) server_flags="-DSSL";; esac
|
||||
for i in $APACHE_SERVER_FLAGS; do
|
||||
case $i in
|
||||
-D) ;;
|
||||
-D*) server_flags="$server_flags $i";;
|
||||
*) server_flags="$server_flags -D$i";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
action="$1"
|
||||
case "$action" in
|
||||
stop|try-restart|*status*|probe)
|
||||
;;
|
||||
*)
|
||||
shift; get_server_flags
|
||||
${get_module_list_done:=false} || /usr/share/$pname/get_module_list && export get_module_list_done=true
|
||||
${get_includes:=false} || /usr/share/$pname/get_includes && export get_includes_done=true
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# main part
|
||||
#
|
||||
case "$action" in
|
||||
start*)
|
||||
if [ -e $pidfile ]; then
|
||||
$0 status &>/dev/null
|
||||
ret=$?
|
||||
if [ $ret = 1 ]; then
|
||||
echo "Warning: found stale pidfile (unclean shutdown?)"
|
||||
elif [ $ret = 0 ]; then
|
||||
echo "Apache is already running ($pidfile)"
|
||||
rc_failed $ret
|
||||
rc_status -v1
|
||||
rc_exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n "Starting httpd2 (${APACHE_MPM:-${apache_bin#*-}}) "
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
if eval $cmdline -t > $logdir/rc$pname.out 2>&1 ; then
|
||||
export -n ${!APACHE_*}
|
||||
eval startproc -f -t ${APACHE_START_TIMEOUT:-2} $cmdline
|
||||
ret=$?
|
||||
|
||||
if test -t 1 && stty -a 2>/dev/null | grep -q -- -echo\ ; then
|
||||
# this means that apache was still waiting for a passphrase to be entered
|
||||
stty echo 2>/dev/null
|
||||
echo;echo
|
||||
echo >&2 An SSL passphrase has not been entered within ${APACHE_START_TIMEOUT:-<not set>} seconds.
|
||||
echo >&2 To increase this timeout, adjust APACHE_START_TIMEOUT in $sysconfig_apache .
|
||||
# this surely means that apache won't start, despite it looked good to startproc
|
||||
killall $apache_bin
|
||||
echo >&2 "Trying to start the server without SSL (-D NOSSL)."
|
||||
$0 start "$@" -D NOSSL
|
||||
# rc_failed 1
|
||||
# rc_status -v1
|
||||
# rc_exit
|
||||
else
|
||||
rc_failed $ret
|
||||
rc_status -v
|
||||
fi
|
||||
else
|
||||
if [ "$link" = "$base" ] ; then
|
||||
cat $logdir/rc$pname.out
|
||||
echo >&2
|
||||
echo >&2 The command line was:
|
||||
echo >&2 $cmdline
|
||||
echo >&2
|
||||
else
|
||||
echo -e -n "\nsee $logdir/rc$pname.out for details\n";
|
||||
fi
|
||||
rc_failed 1
|
||||
rc_status -v1
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down httpd2 "
|
||||
if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
|
||||
if ! [ -f $pidfile ]; then
|
||||
echo -n "(not running)"
|
||||
else
|
||||
pid=$(<$pidfile)
|
||||
kill -TERM $pid 2>/dev/null
|
||||
case $? in
|
||||
1) echo -n "(not running)";;
|
||||
0) # wait until the processes are gone (the parent is the last one)
|
||||
echo -n "(waiting for all children to terminate) "
|
||||
for ((wait=0; wait<120; wait++)); do
|
||||
if test -f $pidfile; then
|
||||
usleep 500000
|
||||
continue
|
||||
fi
|
||||
if ! test -f /proc/$pid/exe; then
|
||||
break
|
||||
fi
|
||||
if test "$(readlink /proc/$pid/exe 2>/dev/null)" = $apache_bin; then
|
||||
usleep 500000
|
||||
else
|
||||
break
|
||||
fi
|
||||
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named condrestart.
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset # Not running is not a failure.
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
$0 configtest "$@" || { rc_failed $?; rc_exit; }
|
||||
|
||||
if $0 status &>/dev/null; then
|
||||
$0 stop
|
||||
fi
|
||||
$0 start "$@"
|
||||
# Remember status and be quiet
|
||||
rc_status
|
||||
;;
|
||||
restart-hup)
|
||||
$0 configtest "$@" || { rc_failed $?; rc_exit; }
|
||||
|
||||
if $0 status &>/dev/null; then
|
||||
echo -n "Restarting httpd2 (SIGHUP)"
|
||||
kill -HUP $(<$pidfile) || return=$rc_failed
|
||||
else
|
||||
$0 start "$@"
|
||||
fi
|
||||
# Remember status and be quiet
|
||||
rc_status -v
|
||||
;;
|
||||
reload|force-reload|graceful)
|
||||
echo -n "Reload httpd2 (graceful restart)"
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
if eval $cmdline -t &> $logdir/rc$pname.out; then
|
||||
killproc -USR1 $apache_bin || return=$rc_failed
|
||||
rc_status -v
|
||||
else
|
||||
if [ "$link" = "$base" ] ; then
|
||||
echo -e -n "\n\n"
|
||||
cat $logdir/rc$pname.out
|
||||
echo >&2
|
||||
echo >&2 The command line was:
|
||||
echo >&2 $cmdline
|
||||
echo >&2
|
||||
else
|
||||
echo -e -n "\nsee $logdir/rc$pname.out for details\n";
|
||||
fi
|
||||
rc_failed 6
|
||||
rc_status -v1
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
|
||||
echo -n "Checking for httpd2: "
|
||||
# we don't use checkproc here since it is confused when we exchange the binaries
|
||||
if ! [ -f $pidfile ]; then
|
||||
# not running
|
||||
rc_failed 3
|
||||
elif [ -s $pidfile -a -d /proc/$(<$pidfile) ]; then
|
||||
# running
|
||||
:
|
||||
else
|
||||
# stale pid file
|
||||
rc_failed 1
|
||||
#rm -f $pidfile
|
||||
fi
|
||||
rc_status -v
|
||||
;;
|
||||
probe)
|
||||
## Optional: Probe for the necessity of a reload,
|
||||
## give out the argument which is required for a reload.
|
||||
|
||||
for i in $httpd_conf \
|
||||
$APACHE_CONF_INCLUDE_FILES \
|
||||
$APACHE_CONF_INCLUDE_DIRS
|
||||
do
|
||||
if [ $i -nt $pidfile ]; then
|
||||
echo reload
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
conf*|test|syntax|check)
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
eval $cmdline -t
|
||||
rc_failed $?
|
||||
rc_exit
|
||||
;;
|
||||
|
||||
extr*)
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
out=$(su - nobody -c "$cmdline" 2>&1)
|
||||
case $out in
|
||||
*make_sock:\ could\ not\ bind\ to\ address*) echo Syntax: OK; rc_failed=0;;
|
||||
*) echo Syntax: NOT OK:; echo $out; rc_failed=1;;
|
||||
esac
|
||||
rc_exit
|
||||
;;
|
||||
|
||||
server-status)
|
||||
apache2ctl status
|
||||
;;
|
||||
|
||||
full-server-status|fullstatus)
|
||||
apache2ctl fullstatus
|
||||
;;
|
||||
|
||||
*)
|
||||
cat >&2 <<-EOF
|
||||
Usage: $0 <command> <server flags>
|
||||
|
||||
where <command> is one of:
|
||||
start - start httpd
|
||||
startssl - start httpd with -DSSL
|
||||
stop - stop httpd (sendign SIGTERM to parent)
|
||||
try-restart - stop httpd and if this succeeds (i.e. if
|
||||
it was running before), start it again.
|
||||
status - check whether httpd is running
|
||||
restart - stop httpd if running; start httpd
|
||||
reload|graceful - do a graceful restart by sending a SIGUSR1 or
|
||||
start if not running
|
||||
configtest - do a configuration syntax test
|
||||
extreme-configtest - try to run httpd as nobody (detects more errors
|
||||
by actually loading the configuration, but cannot
|
||||
read SSL certificates)
|
||||
probe - probe for the necessity of a reload, give
|
||||
out the argument which is required for a reload.
|
||||
(by comparing conf files with pidfile timestamp)
|
||||
full-server-status - dump a full status screen; requires lynx or w3m
|
||||
and mod_status enabled
|
||||
server-status - dump a short status screen; requires lynx or w3m
|
||||
and mod_status enabled
|
||||
help - this screen
|
||||
|
||||
optional server flags are passed through to httpd.
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
||||
# Inform the caller not only verbosely and set an exit status.
|
||||
rc_exit
|
11
robots.txt
Normal file
11
robots.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# exclude help system from robots
|
||||
User-agent: *
|
||||
Disallow: /manual/
|
||||
Disallow: /doc/
|
||||
Disallow: /gif/
|
||||
# but allow htdig to index our doc-tree
|
||||
User-agent: susedig
|
||||
Disallow:
|
||||
# disallow stress test
|
||||
user-agent: stress-agent
|
||||
Disallow: /
|
129
sysconf_addword
Normal file
129
sysconf_addword
Normal file
@ -0,0 +1,129 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2005 Peter Poeml <poeml@suse.de>. All Rights Reserved.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
|
||||
debug=false
|
||||
|
||||
function usage() {
|
||||
cat <<-EOF
|
||||
usage: $(basename $0) [-r] FILE VAR WORD
|
||||
|
||||
Add word WORD to variable VAR in file FILE, or remove
|
||||
it if the -r option is given.
|
||||
|
||||
Example:
|
||||
$(basename $0) /etc/sysconfig/apache2 APACHE_SERVER_FLAGS asdf
|
||||
leads to the change:
|
||||
-APACHE_SERVER_FLAGS="SSL STATUS ruby"
|
||||
+APACHE_SERVER_FLAGS="SSL STATUS ruby asdf"
|
||||
|
||||
If multiple lines matching ^VAR= are found (which happens to be a habit of
|
||||
mine), only the last one is manipulated.
|
||||
|
||||
It does not work for WORD starting with characters like a dash which
|
||||
prevent word boundary matching.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
function word_present () {
|
||||
. $file
|
||||
case " ${!var} " in
|
||||
*" $word "*) true;;
|
||||
*) false;;
|
||||
esac
|
||||
}
|
||||
|
||||
function add_word() {
|
||||
local word=$1
|
||||
local word_quoted=$2
|
||||
if ! word_present; then
|
||||
$debug && cp $file $tmpf
|
||||
|
||||
cat <<-EOT_ED | ed -s $file &>/dev/null
|
||||
H
|
||||
# search backwards to last occurrence of var
|
||||
?^$var
|
||||
s/^\($var=".*\)\(".*\)/\1 $word_quoted\2/
|
||||
s/=" /="/
|
||||
wq
|
||||
EOT_ED
|
||||
|
||||
$debug && diff -u $tmpf $file
|
||||
else
|
||||
echo \"$word\" already present
|
||||
fi
|
||||
}
|
||||
|
||||
function remove_word() {
|
||||
local word=$1
|
||||
local word_quoted=$2
|
||||
if word_present; then
|
||||
$debug && cp $file $tmpf
|
||||
|
||||
cat <<-EOT_ED | ed -s $file &>/dev/null
|
||||
H
|
||||
# search backwards to last occurrence of var
|
||||
?^$var
|
||||
s/\(['" ]\)$word_quoted\(['" ]\)/\1 \2/g
|
||||
s/ / /g
|
||||
wq
|
||||
EOT_ED
|
||||
|
||||
$debug && diff -u $tmpf $file
|
||||
else
|
||||
echo \"$word\" not present
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# poor man's option parsing
|
||||
|
||||
case "$1" in
|
||||
-h) usage; exit 0;;
|
||||
esac
|
||||
|
||||
if [ $# -lt 3 ]; then
|
||||
echo not enough arguments
|
||||
echo
|
||||
usage; exit 1
|
||||
fi
|
||||
|
||||
action=add
|
||||
case "$1" in
|
||||
-r) action=remove; shift;;
|
||||
esac
|
||||
|
||||
file=$1; shift
|
||||
var=$1; shift
|
||||
word=$1
|
||||
word_quoted=${1//\//\\\/}
|
||||
|
||||
if $debug; then
|
||||
echo FILE: $file
|
||||
echo VAR: $var
|
||||
echo WORD: $word
|
||||
echo current content:
|
||||
grep "^$var=" $file | tail -n 1
|
||||
echo
|
||||
|
||||
fi
|
||||
|
||||
|
||||
$debug && tmpf=$(mktemp /tmp/$(basename $0).XXXXXX)
|
||||
|
||||
if [ $action = add ]; then
|
||||
add_word $word $word_quoted
|
||||
else
|
||||
remove_word $word $word_quoted
|
||||
fi
|
||||
|
||||
$debug && rm -f $tmpf
|
||||
|
||||
exit 0
|
270
sysconfig.apache2
Normal file
270
sysconfig.apache2
Normal file
@ -0,0 +1,270 @@
|
||||
## Path: Network/WWW/Apache2
|
||||
## Description: Configuration for Apache 2
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceRestart: apache2
|
||||
#
|
||||
# Here you can name files, separated by spaces, that should be Include'd from
|
||||
# httpd.conf.
|
||||
#
|
||||
# This allows you to add e.g. VirtualHost statements without touching
|
||||
# /etc/apache2/httpd.conf itself, which makes upgrading easier.
|
||||
#
|
||||
APACHE_CONF_INCLUDE_FILES=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceRestart: apache2
|
||||
#
|
||||
# Here you can name directories, separated by spaces, that should be Include'd
|
||||
# from httpd.conf.
|
||||
#
|
||||
# All files contained in these directories will be recursively included by apache.
|
||||
# If a pattern like *.conf is appended, apache will use it.
|
||||
#
|
||||
# Examples: "/etc/apache2/my_conf/"
|
||||
# "/etc/apache2/virtual_hosts/*.conf"
|
||||
# "local/*.conf /srv/www/virtual/"
|
||||
#
|
||||
APACHE_CONF_INCLUDE_DIRS=""
|
||||
|
||||
## Type: string
|
||||
## Default: "actions alias auth_basic authz_host authn_file authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php5"
|
||||
## ServiceRestart: apache2
|
||||
#
|
||||
# [It might look silly to not simply edit httpd.conf for the LoadModule statements.
|
||||
# However, since the LoadModule statements might need an absolute path to the modules,
|
||||
# switching between MPMs can be quite a hassle. It's easier to just give the names here.]
|
||||
#
|
||||
# * list of all modules shipped with the base distribution:
|
||||
#
|
||||
@@all_modules@@
|
||||
#
|
||||
# see http://httpd.apache.org/docs-2.2/mod/ !
|
||||
#
|
||||
# * It pays to use IfDefine statements... like
|
||||
# <IfModule mod_xyz.c>
|
||||
# ....
|
||||
# </IfModule>
|
||||
#
|
||||
# * In the APACHE_MODULES variable, you can use mod_xyz or just xyz syntax.
|
||||
# You may also name an absolute path if you like.
|
||||
#
|
||||
# * NOTE ON MOD_SSL: before you can enable this module, you need a server certificate.
|
||||
# A test certificate can be created by entering
|
||||
# 'cd /usr/share/doc/packages/apache2; ./certificate.sh' as root.
|
||||
# Also, you need to set the ServerName inside the <VirtualHost _default_:443>
|
||||
# block to the fully qualified domain name (see /etc/HOSTNAME).
|
||||
#
|
||||
# * if your server certificate is protected by a passphrase you should increase the
|
||||
# APACHE_START_TIMEOUT (see above)
|
||||
#
|
||||
# * modules listed here will be ignored if they are not installed
|
||||
#
|
||||
#
|
||||
# EXAMPLES:
|
||||
#
|
||||
# fairly minimal
|
||||
# APACHE_MODULES="authz_host alias auth dir log_config mime setenvif"
|
||||
#
|
||||
# apache's default installation
|
||||
# APACHE_MODULES="authz_host actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif status userdir"
|
||||
# your settings
|
||||
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user authn_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php5"
|
||||
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceRestart: apache2
|
||||
#
|
||||
# Additional server flags:
|
||||
#
|
||||
# Put here any server flags ("Defines") that you want to hand over to
|
||||
# httpd at start time, or other command line flags.
|
||||
#
|
||||
# Background: Any directives within an <IfDefine flag>...</IfDefine>
|
||||
# section are only processed if the flag is defined.
|
||||
# This allows to write configuration which is active only in a
|
||||
# special cases, like during server maintenance, or for testing
|
||||
# something temporarily.
|
||||
#
|
||||
# Notably, to enable SSL support, 'SSL' needs to be added here.
|
||||
# To enable the server-status, 'STATUS' needs to be added here.
|
||||
#
|
||||
# It does not matter if you write flag1, -D flag1 or -Dflag1.
|
||||
# Multiple flags can be given as "-D flag1 -D flag2" or simply "flag1 flag2".
|
||||
#
|
||||
# Specifying such flags here is equivalent to giving them on the commandline.
|
||||
# (e.g. via rcapache2 start -DReverseProxy)
|
||||
#
|
||||
# Example:
|
||||
# "SSL STATUS AWSTATS SVN_VIEWCVS no_subversion_today"
|
||||
#
|
||||
APACHE_SERVER_FLAGS=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceRestart: apache2
|
||||
#
|
||||
# Which config file do you want to use?
|
||||
# (if not set, /etc/apache2/httpd.conf is used.)
|
||||
# It is unusual to need to use this setting.
|
||||
#
|
||||
APACHE_HTTPD_CONF=""
|
||||
|
||||
## Type: list(prefork,worker)
|
||||
## Default: ""
|
||||
## ServiceRestart: apache2
|
||||
#
|
||||
# MPM (multi-processing module) to use.
|
||||
#
|
||||
# Needed to determine with which MPM apache will run, as well as
|
||||
# against which header files modules will be built.
|
||||
#
|
||||
# If not set, the system will simply pick one of the installed MPMs.
|
||||
#
|
||||
# The implementation of the logic is in /usr/share/apache2/find_mpm,
|
||||
# a script which can be used standalone as well if needed.
|
||||
#
|
||||
APACHE_MPM=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceReload: apache2
|
||||
#
|
||||
# email address of the server administrator (ServerAdmin directive)
|
||||
# This address is added to the server's responses if APACHE_SERVERSIGNATURE
|
||||
# is set to "email".
|
||||
#
|
||||
# If empty ("") it defaults to webmaster@$FQHOSTNAME, where FQHOSTNAME is
|
||||
# taken from /etc/HOSTNAME.
|
||||
#
|
||||
# Note that ServerAdmin directives inside VirtualHost statements are not
|
||||
# changed, even not the one in the stock SSL virtual host block.
|
||||
#
|
||||
APACHE_SERVERADMIN=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
## ServiceReload: apache2
|
||||
#
|
||||
# ServerName gives the name and port that the server uses to identify itself.
|
||||
# This can often be determined automatically, but we recommend you specify
|
||||
# it explicitly to prevent problems during startup.
|
||||
#
|
||||
# If this is not set to valid DNS name for your host, server-generated
|
||||
# redirections will not work. See also the UseCanonicalName directive.
|
||||
#
|
||||
# If your host doesn't have a registered DNS name, enter its IP address here.
|
||||
# You will have to access it by its address anyway, and this will make
|
||||
# redirections work in a sensible way.
|
||||
#
|
||||
APACHE_SERVERNAME=""
|
||||
|
||||
## Type: integer
|
||||
## Default: 2
|
||||
#
|
||||
# timeout during server startup (seconds)
|
||||
# after this time, the start script decides wether the httpd process started without error.
|
||||
#
|
||||
# Increase it, if you use mod_ssl and your certificate is passphrase protected!
|
||||
#
|
||||
APACHE_START_TIMEOUT="2"
|
||||
|
||||
## Type: list(on,off,email)
|
||||
## Default: "on"
|
||||
## ServiceReload: apache2
|
||||
#
|
||||
# Configures the footer on server-generated documents
|
||||
# This correlates to the ServerSignature directive.
|
||||
#
|
||||
APACHE_SERVERSIGNATURE="on"
|
||||
|
||||
## Type: list(debug,info,notice,warn,error,crit,alert,emerg)
|
||||
## Default: "warn"
|
||||
## ServiceReload: apache2
|
||||
#
|
||||
# LogLevel: Control the number of messages logged to the error_log.
|
||||
#
|
||||
APACHE_LOGLEVEL="warn"
|
||||
|
||||
## Type: string
|
||||
## Default: "/var/log/apache2/access_log combined"
|
||||
## ServiceRestart: apache2
|
||||
#
|
||||
# The location and format of the access logfile (Common Logfile Format).
|
||||
# If you do not define any access logfiles within a <VirtualHost>
|
||||
# container, they will be logged here. Contrarywise, if you *do*
|
||||
# define per-<VirtualHost> access logfiles, transactions will be
|
||||
# logged therein and *not* in this file.
|
||||
#
|
||||
# Simply set it to empty, if you configure it yourself somewhere else.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# If you would like to have agent and referer logfiles:
|
||||
#
|
||||
# setting it to "/var/log/apache2/referer_log referer, /var/log/apache2/agent_log agent"
|
||||
# corresponds to
|
||||
# CustomLog /var/log/apache2/referer_log referer
|
||||
# CustomLog /var/log/apache2/agent_log agent
|
||||
#
|
||||
# If you prefer a single logfile with access, agent, and referer information
|
||||
# (Combined Logfile Format):
|
||||
#
|
||||
# setting it to "/var/log/apache2/access_log combined"
|
||||
# corresponds to
|
||||
# CustomLog /var/log/apache2/access_log combined
|
||||
#
|
||||
APACHE_ACCESS_LOG="/var/log/apache2/access_log combined"
|
||||
|
||||
## Type: list(On,Off,DNS)
|
||||
## Default: "Off"
|
||||
## ServiceReload: apache2
|
||||
#
|
||||
# UseCanonicalName: Determines how Apache constructs self-referencing
|
||||
# URLs and the SERVER_NAME and SERVER_PORT variables.
|
||||
# When set "Off", Apache will use the Hostname and Port supplied
|
||||
# by the client. When set "On", Apache will use the value of the
|
||||
# ServerName directive.
|
||||
#
|
||||
APACHE_USE_CANONICAL_NAME="off"
|
||||
|
||||
## Type: list(Major,Minor,Minimal,ProductOnly,OS,Full)
|
||||
## Default: "OS"
|
||||
## ServiceReload: apache2
|
||||
#
|
||||
# How much information the server response header field contains about the server.
|
||||
# (installed modules, versions, etc.)
|
||||
# see http://httpd.apache.org/docs-2.2/mod/core.html#servertokens
|
||||
#
|
||||
APACHE_SERVERTOKENS="OS"
|
||||
|
||||
## Type: list(on,off)
|
||||
## Default: "off"
|
||||
## ServiceReload: apache2
|
||||
#
|
||||
# If mod_status is used, include extended information about the server, like
|
||||
# CPU usage, in the status report. It is a server-wide setting, and it can cost
|
||||
# some performance!
|
||||
#
|
||||
APACHE_EXTENDED_STATUS="off"
|
||||
|
||||
## Type: list(on,off)
|
||||
## Default: "off"
|
||||
## ServiceRestart: apache2
|
||||
#
|
||||
# Enable buffered logging
|
||||
#
|
||||
APACHE_BUFFERED_LOGS="off"
|
||||
|
||||
## Type: integer
|
||||
## Default: 300
|
||||
## ServiceReload: apache2
|
||||
#
|
||||
# Timeout: The number of seconds before receives and sends time out.
|
||||
# It is a server wide setting.
|
||||
#
|
||||
APACHE_TIMEOUT="300"
|
||||
|
Loading…
Reference in New Issue
Block a user