freebsd-ports/www/apache24/files/pkg-install.in
Olli Hauer 5391a9beb2 - update to 2.4.12
- change MPM backend from static to dynamic,
  but keep mpm_prefork for compatiblity with e.g. php modules
- install dedicated MPM load file in case httpd was build with modular MPM
  (modules.d/000_mpm_prefork_fallback.conf)
- disable SSLv3 and SSLv2 fallback in sample httpd-ssl-conf
- use @sample macro instead EXAMPLESDIR
- add some SSLCipherSuite examples for OpenSSL >= 1.0.x
- add libressl support [1]
- add pkg-install script (to handle new modular MPM build)
- build now most all modules, so users using packages don't have
  to run a custom build for missing modules
- fix suexec mode

PR:		196139 [1]
MFH:		2015Q1
2015-01-31 15:22:51 +00:00

65 lines
1.9 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
# Note:
# We have to use grep or wc after awk, else
# there is no usable ret value that can be
# used for further processing
HTTPD_CONF="%%ETCDIR%%/httpd.conf"
MPM_FALLBACK="%%ETCDIR%%/modules.d/%%MPMF%%"
_log_msg(){
/usr/bin/logger -p local0.notice -s -t apache24 "$1"
}
_check_deprecated(){
if [ -r ${HTTPD_CONF} ]; then
/usr/bin/awk '/^LoadModule[[:blank:]]+mpm_(event|prefork|worker)_module/ {print $2}' ${HTTPD_CONF} | /usr/bin/grep -q '^mpm_'
if [ $? -ne 0 ]; then
_log_msg "==================================================="
_log_msg "WARNING!"
_log_msg " No apache MPM module is activated in httpd.conf,"
_log_msg " mpm_prefork will be activated as fall back"
_log_msg ""
_log_msg " Please follow the instructions in"
_log_msg " ${MPM_FALLBACK}"
_log_msg "==================================================="
cat > ${MPM_FALLBACK} << _EOF
# ==================================================================
# Note:
# www/apache24 build changed from static MPM to modular MPM loading!
#
# This file was installed as fall back, since no activated MPM
# was detected in the existing httpd.conf.
#
# Please merge additions from httpd.conf.sample into your httpd.conf!
#
# After activating one of the mpm_modules in httpd.conf it is save
# to deactivate the "LoadModule" line in this file.
#
# In case mod_(php|perl|python|...) modules from the official FreeBSD
# package repo are installed please use the mpm_prefork module, else
# feel free to test mpm_event (preferred) or mpm_worker.
#
# For more information see:
# http://httpd.apache.org/docs/2.4/mod/
# ==================================================================
LoadModule mpm_prefork_module libexec/apache24/mod_mpm_prefork.so
_EOF
fi # $? -ne 0
else
echo ${HTTPD_CONF} not readable
fi
}
# run only if build with modular MPM
if [ "$2" = "POST-INSTALL" ]; then
%%MPM_FALLBACK_CHECK%%_check_deprecated
fi