summaryrefslogtreecommitdiff
path: root/source/n/httpd
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2012-09-26 01:10:42 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:51:55 +0200
commit9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch)
treeb428a16618e36ed864a8d76ea3435e19a452bf90 /source/n/httpd
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.gz
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
Diffstat (limited to 'source/n/httpd')
-rw-r--r--source/n/httpd/README34
-rw-r--r--source/n/httpd/config.layout.diff30
-rw-r--r--source/n/httpd/doinst.sh53
-rwxr-xr-xsource/n/httpd/httpd.SlackBuild54
-rw-r--r--source/n/httpd/httpd.brigade_move.__noinline__.gcc451.diff10
-rw-r--r--source/n/httpd/httpd.nossldefault.diff11
-rw-r--r--source/n/httpd/httpd.url4
-rw-r--r--source/n/httpd/rc.httpd11
8 files changed, 85 insertions, 122 deletions
diff --git a/source/n/httpd/README b/source/n/httpd/README
deleted file mode 100644
index 796bb29a..00000000
--- a/source/n/httpd/README
+++ /dev/null
@@ -1,34 +0,0 @@
-WARNING
-
-This script builds a package that conflicts with apache1. Before
-attempting to install this package, you should uninstall any of
-these packages that you find on your system:
-
-apache
-mod_ssl
-php
-
-Really though, the only points of overlap are in /usr/sbin, so if you
-leave your old packages in place apache2 will still work, but the
-apache1 httpd will have been overwritten (along with other files)
-
-Apache is the most popular web server in the known universe; over half
-the servers on the Internet are running Apache or one of its variants.
-
-By default, we build apache2 with the traditional "apache prefork" multi
-processing module (MPM). This is somewhat safer for the use of mod_php,
-but can still carry some security risks (all your php scripts run as the
-user configured to run apache2).
-
-For enhanced multi-threaded performance, use "apache worker", but using
-mod_php with "worker" is considered dangerous. PHP Core is multi-thread
-safe, but many PHP extensions are *NOT*. To build apache2 with the
-worker MPM, change the option to: --with-mpm=worker
-
-Please note that this script does not build apache2 with SuEXEC support.
-The Apache group feels SuEXEC should not be part of a default install.
-If you need this functionality, please read the following documentation
-and make the necessary changes to the ./configure options in the script.
-
- http://httpd.apache.org/docs/2.0/suexec.html
-
diff --git a/source/n/httpd/config.layout.diff b/source/n/httpd/config.layout.diff
deleted file mode 100644
index c302515f..00000000
--- a/source/n/httpd/config.layout.diff
+++ /dev/null
@@ -1,30 +0,0 @@
---- ./config.layout.orig 2004-11-21 12:50:36.000000000 -0600
-+++ ./config.layout 2007-05-23 13:35:20.000000000 -0500
-@@ -322,3 +322,27 @@
- installbuilddir: ${prefix}/etc/apache2/build
- errordir: ${datadir}/error
- </Layout>
-+
-+# FHS layout
-+<Layout Slackware-FHS>
-+ prefix: /usr
-+ exec_prefix: ${prefix}
-+ bindir: ${prefix}/bin
-+ sbindir: ${prefix}/sbin
-+ libdir: ${prefix}/lib/httpd
-+ libexecdir: ${prefix}/lib/httpd/modules
-+ installbuilddir: ${prefix}/lib/httpd/build
-+ mandir: ${prefix}/man
-+ sysconfdir: /etc/httpd
-+ datadir: /srv/httpd
-+ iconsdir: ${datadir}/icons
-+ htdocsdir: ${datadir}/htdocs
-+ manualdir: ${htdocsdir}/manual
-+ cgidir: ${datadir}/cgi-bin
-+ errordir: ${datadir}/error
-+ includedir: ${prefix}/include/httpd
-+ localstatedir: /var
-+ runtimedir: ${localstatedir}/run/httpd
-+ logfiledir: ${localstatedir}/log/httpd
-+ proxycachedir: ${localstatedir}/cache/httpd
-+</Layout>
diff --git a/source/n/httpd/doinst.sh b/source/n/httpd/doinst.sh
index 49e5400d..da256515 100644
--- a/source/n/httpd/doinst.sh
+++ b/source/n/httpd/doinst.sh
@@ -1,4 +1,29 @@
#!/bin/sh
+
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ # Don't use config() -- we always want to install this, changed or unchanged.
+ #config ${NEW}
+}
+
if [ ! -e var/log/httpd ]; then
mkdir -p var/log/httpd
chmod 755 var/log/httpd
@@ -26,27 +51,19 @@ if [ -r var/www/htdocs/index.html ]; then
fi
fi
-config() {
- NEW="$1"
- OLD="`dirname $NEW`/`basename $NEW .new`"
- # If there's no config file by that name, mv it over:
- if [ ! -r $OLD ]; then
- mv $NEW $OLD
- elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
- rm $NEW
- fi
- # Otherwise, we leave the .new copy for the admin to consider...
-}
-# Keep same perms on rc.httpd.new:
-if [ -e etc/rc.d/rc.httpd ]; then
- cp -a etc/rc.d/rc.httpd etc/rc.d/rc.httpd.new.incoming
- cat etc/rc.d/rc.httpd.new > etc/rc.d/rc.httpd.new.incoming
- mv etc/rc.d/rc.httpd.new.incoming etc/rc.d/rc.httpd.new
-fi
-config etc/rc.d/rc.httpd.new
+# Keep same perms when installing rc.httpd.new:
+preserve_perms etc/rc.d/rc.httpd.new
+# Always install the new rc.httpd:
+mv etc/rc.d/rc.httpd.new etc/rc.d/rc.httpd
+
+# Handle config files. Unless this is a fresh installation, the
+# admin will have to move the .new files into place to complete
+# the package installation, as we don't want to clobber files that
+# may contain local customizations.
config etc/httpd/httpd.conf.new
config etc/logrotate.d/httpd.new
for conf_file in etc/httpd/extra/*.new; do
config $conf_file
done
config var/www/htdocs/index.html.new
+
diff --git a/source/n/httpd/httpd.SlackBuild b/source/n/httpd/httpd.SlackBuild
index a97ccf36..1d043f74 100755
--- a/source/n/httpd/httpd.SlackBuild
+++ b/source/n/httpd/httpd.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,7 @@
PKGNAM=httpd
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -73,29 +73,49 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# "prefork" is the default, safe, mpm type. If you *are not* using PHP, and you
-# like to live on the bleeding edge, you may wish to change the --with-mpm option
-# to "worker", which is the new way of doing things, but is multithreaded and
-# many scripts (especially PHP ones) are not multithread safe.
+# A brief note about mpms:
#
-# I'd leave this option the way is it on any production box that's keeping up
-# with HTTP requests. No reason to chance it, IMHO.
+# "prefork" is the legacy forked mpm, used with mod_php. Starting with httpd
+# 2.4.0, new threaded mpms are available, and previously experimental mpms are
+# now stable
+#
+# Non-threaded mpms are no longer required, since php applications can now be
+# deployed with the help of mod_fcgid, essentially a set of fixed dedicated cgi
+# processes spawned for the whole purpose of executing dynamic applications
+#
+# Threaded mpms, by their very nature, are far more scalable than the
+# traditional preforking solution. They consume less memory for the same
+# workload, when serving the same amount of clients. httpd 2.4 ships with two
+# options, "event" and "worker", where the former is the default mpm used if
+# none is specified at the ./configure line
+#
+# Lastly, the "prefork" mpm can be used with mod_php as of version 5.4.0,
+# which yields a much improved stability, even with most mod_php extensions
+# loaded.
+#
+# The running mpm can be changed by simply loading the module. Here is a sample:
+# LoadModule mpm_event_module lib(64)/httpd/modules/mod_mpm_event.so
+#
+# When upgrading from 2.2, please make sure to stop the deamon first, or your
+# new instance may segfault.
-zcat $CWD/config.layout.diff.gz | sed -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" | patch --verbose -p1 || exit 1
+# Fix config.layout to use lib${LIBDIRSUFFIX}:
+sed -i -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" config.layout
-# Patch to fix aliasing issue exposed by gcc-4.5.1:
-zcat $CWD/httpd.brigade_move.__noinline__.gcc451.diff.gz | patch --verbose -p1 || exit 1
+# If /var/run becomes a tmpfs or a link to /run, subdirectories could be a problem.
+# Just use /var/run rather than /var/run/httpd.
+sed -i -e "s#/run/httpd#/run#" config.layout
# Configure:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--enable-layout=Slackware-FHS \
- --with-mpm=prefork \
--with-apr=/usr \
--with-apr-util=/usr \
--enable-mods-shared=all \
--enable-so \
+ --enable-mpms-shared=all \
--enable-pie \
--enable-cgi \
--with-pcre \
@@ -105,12 +125,10 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-proxy \
--enable-proxy-http \
--enable-proxy-ftp \
- --enable-proxy-balancer \
--enable-cache \
--enable-mem-cache \
--enable-file-cache \
--enable-disk-cache \
- --disable-speling \
--enable-dav \
--enable-ldap \
--enable-authnz-ldap \
@@ -126,8 +144,12 @@ rmdir $PKG/usr/bin
# Tweak default apache configuration
( cd $PKG
- zcat $CWD/httpd.nossldefault.diff.gz | sed -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" | patch -p1 --verbose || exit 1
zcat $CWD/httpd.runasapache.diff.gz | patch -p1 --verbose || exit 1
+ # mod_proxy_balancer should be commented out, as otherwise httpd
+ # will not start without additional configuration:
+ sed -i "s/^LoadModule proxy_balancer_module/#LoadModule proxy_balancer_module/g" $PKG/etc/httpd/httpd.conf
+ # This module issues a warning unless some non-default modules are loaded:
+ sed -i "s/^LoadModule lbmethod_heartbeat_module/#LoadModule lbmethod_heartbeat_module/g" $PKG/etc/httpd/httpd.conf
rm -f $PKG/etc/httpd/httpd.conf~ $PKG/etc/httpd/httpd.conf.orig
) || exit 1
# Change config files to .new:
@@ -144,7 +166,7 @@ cat << EOF >> $PKG/etc/httpd/httpd.conf.new
#
#Include /etc/httpd/mod_php.conf
-# Uncomment the following lines to enable svn support:
+# Uncomment the following lines (and mod_dav above) to enable svn support:
#
#LoadModule dav_svn_module lib${LIBDIRSUFFIX}/httpd/modules/mod_dav_svn.so
#LoadModule authz_svn_module lib${LIBDIRSUFFIX}/httpd/modules/mod_authz_svn.so
diff --git a/source/n/httpd/httpd.brigade_move.__noinline__.gcc451.diff b/source/n/httpd/httpd.brigade_move.__noinline__.gcc451.diff
deleted file mode 100644
index e8915ae4..00000000
--- a/source/n/httpd/httpd.brigade_move.__noinline__.gcc451.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./server/core_filters.c.orig 2010-02-26 03:32:15.000000000 -0600
-+++ ./server/core_filters.c 2011-02-12 13:23:22.000000000 -0600
-@@ -83,6 +83,7 @@
- *
- * XXXX: Should this function be added to APR-Util?
- */
-+__attribute__((__noinline__))
- static void brigade_move(apr_bucket_brigade *b, apr_bucket_brigade *a,
- apr_bucket *e)
- {
diff --git a/source/n/httpd/httpd.nossldefault.diff b/source/n/httpd/httpd.nossldefault.diff
deleted file mode 100644
index bcf891f8..00000000
--- a/source/n/httpd/httpd.nossldefault.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./etc/httpd/httpd.conf.orig 2007-05-17 23:40:15.000000000 -0500
-+++ ./etc/httpd/httpd.conf 2007-05-18 15:55:38.000000000 -0500
-@@ -88,7 +88,7 @@
- LoadModule proxy_http_module lib/httpd/modules/mod_proxy_http.so
- LoadModule proxy_ajp_module lib/httpd/modules/mod_proxy_ajp.so
- LoadModule proxy_balancer_module lib/httpd/modules/mod_proxy_balancer.so
--LoadModule ssl_module lib/httpd/modules/mod_ssl.so
-+#LoadModule ssl_module lib/httpd/modules/mod_ssl.so
- LoadModule mime_module lib/httpd/modules/mod_mime.so
- LoadModule dav_module lib/httpd/modules/mod_dav.so
- LoadModule status_module lib/httpd/modules/mod_status.so
diff --git a/source/n/httpd/httpd.url b/source/n/httpd/httpd.url
index 8b8a1768..3fabb916 100644
--- a/source/n/httpd/httpd.url
+++ b/source/n/httpd/httpd.url
@@ -1,2 +1,2 @@
-http://www.apache.org/dist/httpd/httpd-2.2.17.tar.bz2
-http://www.apache.org/dist/httpd/httpd-2.2.17.tar.bz2.asc
+http://www.apache.org/dist/httpd/httpd-2.4.3.tar.bz2
+http://www.apache.org/dist/httpd/httpd-2.4.3.tar.bz2.asc
diff --git a/source/n/httpd/rc.httpd b/source/n/httpd/rc.httpd
index 064f6ea4..81189098 100644
--- a/source/n/httpd/rc.httpd
+++ b/source/n/httpd/rc.httpd
@@ -17,7 +17,16 @@ case "$1" in
'stop')
/usr/sbin/apachectl -k stop
killall httpd
- rm -f /var/run/httpd/*.pid
+ # Remove both old and new .pid locations:
+ rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
+ ;;
+ 'force-restart')
+ # Because sometimes restarting through apachectl just doesn't do the trick...
+ /usr/sbin/apachectl -k stop
+ killall httpd
+ # Remove both old and new .pid locations:
+ rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
+ /usr/sbin/apachectl -k start
;;
'restart')
/usr/sbin/apachectl -k restart