summaryrefslogtreecommitdiff
path: root/www/apache24/files
diff options
context:
space:
mode:
Diffstat (limited to 'www/apache24/files')
-rw-r--r--www/apache24/files/apache24.in196
-rw-r--r--www/apache24/files/htcacheclean.in62
-rw-r--r--www/apache24/files/no-accf.conf4
-rw-r--r--www/apache24/files/patch-Makefile.in115
-rw-r--r--www/apache24/files/patch-config.layout26
-rw-r--r--www/apache24/files/patch-configure.in35
-rw-r--r--www/apache24/files/patch-docs__conf__extra__httpd-autoindex.conf.in9
-rw-r--r--www/apache24/files/patch-docs__conf__extra__httpd-ssl.conf.in22
-rw-r--r--www/apache24/files/patch-docs__conf__extra__httpd-userdir.conf.in11
-rw-r--r--www/apache24/files/patch-docs__conf__httpd.conf.in49
-rw-r--r--www/apache24/files/patch-support__Makefile.in33
-rw-r--r--www/apache24/files/patch-support__apachectl.in10
-rw-r--r--www/apache24/files/patch-support__apxs.in27
-rw-r--r--www/apache24/files/patch-support__envvars-std.in13
-rw-r--r--www/apache24/files/patch-support__log_server_status.in20
15 files changed, 632 insertions, 0 deletions
diff --git a/www/apache24/files/apache24.in b/www/apache24/files/apache24.in
new file mode 100644
index 000000000000..e5fd89e8dac3
--- /dev/null
+++ b/www/apache24/files/apache24.in
@@ -0,0 +1,196 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+# PROVIDE: apache24
+# REQUIRE: LOGIN cleanvar sshd
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable apache24:
+# apache24_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable apache24
+# apache24_profiles (str): Set to "" by default.
+# Define your profiles here.
+# apache24limits_enable (bool):Set to "NO" by default.
+# Set it to yes to run `limits $limits_args`
+# just before apache starts.
+# apache24_flags (str): Set to "" by default.
+# Extra flags passed to start command.
+# apache24limits_args (str): Default to "-e -C daemon"
+# Arguments of pre-start limits run.
+# apache24_http_accept_enable (bool): Set to "NO" by default.
+# Set to yes to check for accf_http kernel
+# module on start up and load if not loaded.
+# apache24_fib (str): Set an altered default network view for apache
+
+. /etc/rc.subr
+
+name="apache24"
+rcvar=apache24_enable
+
+start_precmd="apache24_prestart"
+restart_precmd="apache24_checkconfig"
+reload_precmd="apache24_checkconfig"
+reload_cmd="apache24_graceful"
+graceful_cmd="apache24_graceful"
+gracefulstop_cmd="apache24_gracefulstop"
+configtest_cmd="apache24_checkconfig"
+command="%%PREFIX%%/sbin/httpd"
+_pidprefix="/var/run/httpd"
+pidfile="${_pidprefix}.pid"
+required_files=%%PREFIX%%/etc/apache24/httpd.conf
+envvars="%%PREFIX%%/sbin/envvars"
+
+[ -z "$apache24_enable" ] && apache24_enable="NO"
+[ -z "$apache24limits_enable" ] && apache24limits_enable="NO"
+[ -z "$apache24limits_args" ] && apache24limits_args="-e -C daemon"
+[ -z "$apache24_http_accept_enable" ] && apache24_http_accept_enable="NO"
+
+apache24_accf()
+{
+ if checkyesno apache24_http_accept_enable; then
+ /sbin/kldstat -v | grep accf_http > /dev/null 2>&1 || /sbin/kldload accf_http || return ${?}
+ /sbin/kldstat -v | grep accf_data > /dev/null 2>&1 || /sbin/kldload accf_data || return ${?}
+ else
+ apache24_flags="${apache24_flags} -DNOHTTPACCEPT"
+ fi
+}
+
+load_rc_config $name
+
+if [ -n "$2" ]; then
+ profile="$2"
+ if [ "x${apache24_profiles}" != "x" ]; then
+ pidfile="${_pidprefix}.${profile}.pid"
+ eval apache24_configfile="\${apache24_${profile}_configfile:-}"
+ if [ "x${apache24_configfile}" = "x" ]; then
+ echo "You must define a configuration file (apache24_${profile}_configfile)"
+ exit 1
+ fi
+ required_files="${apache24_configfile}"
+ eval apache24_enable="\${apache24_${profile}_enable:-${apache24_enable}}"
+ eval apache24_flags="\${apache24_${profile}_flags:-${apache24_flags}}"
+ eval apache24_http_accept_enable="\${apache24_${profile}_http_accept_enable:-${apache24_http_accept_enable}}"
+ eval apache24limits_enable="\${apache24limits_${profile}_enable:-${apache24limits_enable}}"
+ eval apache24limits_args="\${apache24limits_${profile}_args:-${apache24limits_args}}"
+ eval apache24_fib="\${apache24_${profile}_fib:-${apache24_fib}}"
+ eval command="\${apache24_${profile}_command:-${command}}"
+ eval pidfile="\${apache24_${profile}_pidfile:-${pidfile}}"
+ eval apache24_envvars="\${apache24_${profile}_envvars:-${envvars}}"
+ apache24_flags="-f ${apache24_configfile} -c \"PidFile ${pidfile}\" ${apache24_flags}"
+ else
+ echo "$0: extra argument ignored"
+ fi
+else
+ eval apache24_envvars=${envvars}
+ if [ "x${apache24_profiles}" != "x" -a "x$1" != "x" ]; then
+ for profile in ${apache24_profiles}; do
+ eval _enable="\${apache24_${profile}_enable}"
+ case "x${_enable:-${apache24_enable}}" in
+ x|x[Nn][Oo]|x[Nn][Oo][Nn][Ee])
+ continue
+ ;;
+ x[Yy][Ee][Ss])
+ ;;
+ *)
+ if test -z "$_enable"; then
+ _var=apache24_enable
+ else
+ _var=apache24_"${profile}"_enable
+ fi
+ echo "Bad value" \
+ "'${_enable:-${apache24_enable}}'" \
+ "for ${_var}. " \
+ "Profile ${profile} skipped."
+ continue
+ ;;
+ esac
+ echo "===> apache24 profile: ${profile}"
+ %%PREFIX%%/etc/rc.d/apache24 $1 ${profile}
+ retcode="$?"
+ if [ "0${retcode}" -ne 0 ]; then
+ failed="${profile} (${retcode}) ${failed:-}"
+ else
+ success="${profile} ${success:-}"
+ fi
+ done
+ exit 0
+ fi
+fi
+
+if [ "${1}" != "stop" ] ; then \
+ apache24_accf
+fi
+
+apache24_requirepidfile()
+{
+ apache24_checkconfig
+
+ if [ ! "0`check_pidfile ${pidfile} ${command}`" -gt 1 ]; then
+ echo "${name} not running? (check $pidfile)."
+ exit 1
+ fi
+}
+
+apache24_checkconfig()
+{
+ if test -f ${apache24_envvars}
+ then
+ . ${apache24_envvars}
+ fi
+
+ echo "Performing sanity check on apache24 configuration:"
+ eval ${command} ${apache24_flags} -t
+}
+
+apache24_graceful() {
+ apache24_requirepidfile
+
+ echo "Performing a graceful restart"
+ eval ${command} ${apache24_flags} -k graceful
+}
+
+apache24_gracefulstop() {
+ apache24_requirepidfile
+
+ echo "Performing a graceful stop"
+ eval ${command} ${apache24_flags} -k graceful-stop
+}
+
+apache24_precmd()
+{
+ apache24_checkconfig
+
+ if checkyesno apache24limits_enable
+ then
+ eval `/usr/bin/limits ${apache24limits_args}` 2>/dev/null
+ else
+ return 0
+ fi
+
+}
+
+apache24_checkfib () {
+ if command -v check_namevarlist > /dev/null 2>&1; then
+ check_namevarlist fib && return 0
+ fi
+
+ $SYSCTL net.fibs >/dev/null 2>&1 || return 0
+
+ apache24_fib=${apache24_fib:-"NONE"}
+ if [ "x$apache24_fib" != "xNONE" ]
+ then
+ command="/usr/sbin/setfib -F ${apache24_fib} ${command}"
+ else
+ return 0
+ fi
+}
+
+apache24_prestart() {
+ apache24_checkfib
+ apache24_precmd
+}
+
+extra_commands="reload graceful gracefulstop configtest"
+run_rc_command "$1"
diff --git a/www/apache24/files/htcacheclean.in b/www/apache24/files/htcacheclean.in
new file mode 100644
index 000000000000..656f75365cfb
--- /dev/null
+++ b/www/apache24/files/htcacheclean.in
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: htcacheclean
+#
+# Configuration settings for htcacheclean in /etc/rc.conf
+#
+# htcacheclean_enable (bool)
+# Set to "NO" by default
+# Set it to "YES" to enable htcacheclean
+#
+# htcacheclean_cache (str) Set to "%%PREFIX%%/www/proxy" by default Set the
+# location of the mod_disk_cache CacheRoot This should be the same as whats in
+# your httpd.conf
+#
+# htcacheclean_cachelimit (str) Set to "512M" by default Sets the size
+# htcacheclean should prune the disk cache to expressed in bytes by default, K
+# for kilobytes, M for megabytes.
+#
+# htcacheclean_interval (num)
+# Set to "10" by default
+# Sets how frequently in munutes htcacheclean wakes up and prunes the cache
+#
+# htcacheclean_args (str)
+# Set to "-t -n -i" by default
+# Sets extra command-line arguments to htcacheclean
+# -t Delete all empty directories
+# -n Be nice by sleeping occasionally to not saturate the I/O bandwith of the disk
+# -i Run only when there was a modification of the disk cache
+
+. /etc/rc.subr
+
+name="htcacheclean"
+rcvar=htcacheclean_enable
+
+load_rc_config "${name}"
+
+htcacheclean_enable="${htcacheclean_enable:-"NO"}"
+htcacheclean_cache="${htcacheclean_cache:-"%%PREFIX%%/www/proxy"}"
+htcacheclean_cachelimit="${htcacheclean_cachelimit:-"512M"}"
+htcacheclean_interval="${htcacheclean_interval:-"60"}"
+htcacheclean_args="${htcacheclean_args:-"-t -n -i"}"
+
+start_precmd="htc_check"
+restart_precmd="htc_check"
+restart_reload="htc_check"
+
+command="%%PREFIX%%/sbin/htcacheclean"
+flags="-p${htcacheclean_cache} -d${htcacheclean_interval} -l${htcacheclean_cachelimit} ${htcacheclean_args}"
+required_dirs="${htcacheclean_cache}"
+
+htc_check()
+{
+ [ ! -d ${htcacheclean_cache} ] && {
+ echo ""
+ return 1
+ }
+ return 0
+}
+
+run_rc_command "$1"
diff --git a/www/apache24/files/no-accf.conf b/www/apache24/files/no-accf.conf
new file mode 100644
index 000000000000..10e51644ce82
--- /dev/null
+++ b/www/apache24/files/no-accf.conf
@@ -0,0 +1,4 @@
+<IfDefine NOHTTPACCEPT>
+ AcceptFilter http none
+ AcceptFilter https none
+</IfDefine>
diff --git a/www/apache24/files/patch-Makefile.in b/www/apache24/files/patch-Makefile.in
new file mode 100644
index 000000000000..0794f433c063
--- /dev/null
+++ b/www/apache24/files/patch-Makefile.in
@@ -0,0 +1,115 @@
+--- ./Makefile.in.orig 2012-12-17 12:50:41.000000000 +0100
++++ ./Makefile.in 2013-03-24 16:01:58.000000000 +0100
+@@ -32,9 +32,10 @@
+ install-conf:
+ @echo Installing configuration files
+ @$(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(sysconfdir)/extra
+- @$(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir)/original/extra
++ @$(MKINSTALLDIRS) $(DESTDIR)$(EXAMPLESDIR) $(DESTDIR)$(EXAMPLESDIR)/extra
+ @cd $(top_srcdir)/docs/conf; \
+ for i in mime.types magic; do \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(EXAMPLESDIR); \
+ if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
+ fi; \
+@@ -78,14 +79,14 @@
+ -e 's#@@SSLPort@@#$(SSLPORT)#g' \
+ < $$i; \
+ fi \
+- ) > $(DESTDIR)$(sysconfdir)/original/$$i; \
+- chmod 0644 $(DESTDIR)$(sysconfdir)/original/$$i; \
++ ) > $(DESTDIR)$(EXAMPLESDIR)/$$i; \
++ chmod 0644 $(DESTDIR)$(EXAMPLESDIR)/$$i; \
+ file=$$i; \
+ if [ "$$i" = "httpd.conf" ]; then \
+ file=`echo $$i|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \
+ fi; \
+ if test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \
+- $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/original/$$i $(DESTDIR)$(sysconfdir)/$$file; \
++ $(INSTALL_DATA) $(DESTDIR)$(EXAMPLESDIR)/$$i $(DESTDIR)$(sysconfdir)/$$file; \
+ fi; \
+ fi; \
+ done ; \
+@@ -137,48 +138,26 @@
+ doxygen $(top_srcdir)/docs/doxygen.conf
+
+ install-htdocs:
+- -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \
+- echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \
+- else \
+- echo Installing HTML documents ; \
++ @echo Installing HTML documents ; \
+ $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
+- if test -d $(htdocs-srcdir) && test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
+- $(RSYNC) --exclude .svn -rlpt --numeric-ids $(htdocs-srcdir)/ $(DESTDIR)$(htdocsdir)/; \
+- else \
+- test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \
+- cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
+- fi; \
+- fi
++ $(MKINSTALLDIRS) $(DESTDIR)$(EXAMPLESDIR) ; \
++ test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp index.html $(DESTDIR)$(EXAMPLESDIR)) && \
++ ( [ ! -f $(DESTDIR)$(htdocsdir)/index.html ] && cp -p $(DESTDIR)$(EXAMPLESDIR)/index.html $(DESTDIR)$(htdocsdir)/index.html) || true
+
+ install-error:
+- -@if [ -d $(DESTDIR)$(errordir) ]; then \
+- echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \
+- else \
+- echo Installing error documents ; \
++ @echo Installing error documents ; \
+ $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \
+- cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \
+- test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
+- fi
++ cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ;
+
+ install-icons:
+- -@if [ -d $(DESTDIR)$(iconsdir) ]; then \
+- echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \
+- else \
+- echo Installing icons ; \
++ @echo Installing icons ; \
+ $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \
+- cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \
+- test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
+- fi
++ cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ;
+
+ install-cgi:
+- -@if [ -d $(DESTDIR)$(cgidir) ];then \
+- echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \
+- else \
+- echo Installing CGIs ; \
++ @echo Installing CGIs ; \
+ $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \
+- cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \
+- test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
+- fi
++ cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ;
+
+ install-other:
+ @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)
+@@ -229,14 +208,15 @@
+ @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1
+ @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8
+ @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
+- @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
+- @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
+- @if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
+- $(RSYNC) --exclude .svn -rlpt --numeric-ids $(top_srcdir)/docs/manual/ $(DESTDIR)$(manualdir)/; \
+- else \
+- cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir); \
+- cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \
+- fi
++ for i in ab.1 apxs.1 dbmmanage.1 htdbm.1 htdigest.1 htpasswd.1 httxt2dbm.1 logresolve.1 ; do \
++ ${INSTALL_MAN} $(top_srcdir)/docs/man/$$i $(DESTDIR)$(mandir)/man1; \
++ done
++ for i in apachectl.8 fcgistarter.8 htcacheclean.8 httpd.8 rotatelogs.8 suexec.8 ; do \
++ ${INSTALL_MAN} $(top_srcdir)/docs/man/$$i $(DESTDIR)$(mandir)/man8; \
++ done
++.if !defined(NOPORTDOCS)
++ cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir);
++.endif
+
+ install-suexec:
+ @if test -f $(builddir)/support/suexec; then \
diff --git a/www/apache24/files/patch-config.layout b/www/apache24/files/patch-config.layout
new file mode 100644
index 000000000000..98b93ecfd161
--- /dev/null
+++ b/www/apache24/files/patch-config.layout
@@ -0,0 +1,26 @@
+--- ./config.layout.orig 2012-04-17 16:01:41.000000000 +0200
++++ ./config.layout 2013-03-22 18:55:53.000000000 +0100
+@@ -257,17 +257,17 @@
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/sbin
+ libdir: ${exec_prefix}/lib
+- libexecdir: ${exec_prefix}/libexec/apache2
++ libexecdir: ${exec_prefix}/libexec/apache24
+ mandir: ${prefix}/man
+- sysconfdir: ${prefix}/etc/apache2
+- datadir: ${prefix}/www
+- installbuilddir: ${prefix}/share/apache2/build
++ sysconfdir: ${prefix}/etc/apache24
++ datadir: ${prefix}/www/apache24
++ installbuilddir: ${prefix}/share/apache24/build
+ errordir: ${datadir}/error
+ iconsdir: ${datadir}/icons
+ htdocsdir: ${datadir}/data
+- manualdir: ${prefix}/share/doc/apache2
++ manualdir: ${prefix}/share/doc/apache24
+ cgidir: ${datadir}/cgi-bin
+- includedir: ${prefix}/include/apache2
++ includedir: ${prefix}/include/apache24
+ localstatedir: /var
+ runtimedir: ${localstatedir}/run
+ logfiledir: ${localstatedir}/log
diff --git a/www/apache24/files/patch-configure.in b/www/apache24/files/patch-configure.in
new file mode 100644
index 000000000000..3c495005e6b3
--- /dev/null
+++ b/www/apache24/files/patch-configure.in
@@ -0,0 +1,35 @@
+--- ./configure.in.orig 2013-01-09 17:39:05.000000000 +0100
++++ ./configure.in 2013-03-22 18:55:53.000000000 +0100
+@@ -111,7 +111,7 @@
+
+ if test "$apr_found" = "reconfig"; then
+ APR_SUBDIR_CONFIG(srclib/apr,
+- [$apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir],
++ [$apache_apr_flags --prefix=$prefix],
+ [--enable-layout=*|\'--enable-layout=*])
+ dnl We must be the first to build and the last to be cleaned
+ AP_BUILD_SRCLIB_DIRS="apr $AP_BUILD_SRCLIB_DIRS"
+@@ -177,7 +177,7 @@
+
+ if test "$apu_found" = "reconfig"; then
+ APR_SUBDIR_CONFIG(srclib/apr-util,
+- [--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir],
++ [--with-apr=../apr --prefix=$prefix],
+ [--enable-layout=*|\'--enable-layout=*])
+ dnl We must be the last to build and the first to be cleaned
+ AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS apr-util"
+@@ -822,8 +822,14 @@
+ [Root directory of the Apache install area])
+ AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf",
+ [Location of the config file, relative to the Apache root directory])
++AC_DEFINE_UNQUOTED(DEFAULT_ERRORLOG, "${rel_logfiledir}/httpd-error.log",
++ [Location of error log file])
++AC_DEFINE_UNQUOTED(DEFAULT_SCOREBOARD, "${rel_runtimedir}/apache_runtime_status",
++ [Location of ScoreBoard file])
+ AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "${rel_sysconfdir}/mime.types",
+ [Location of the MIME types config file, relative to the Apache root directory])
++AC_DEFINE_UNQUOTED(DOCUMENT_LOCATION, "${rel_htdocsdir}",
++ [Location of document root])
+
+ perlbin=`$ac_aux_dir/PrintPath perl`
+ if test "x$perlbin" = "x"; then
diff --git a/www/apache24/files/patch-docs__conf__extra__httpd-autoindex.conf.in b/www/apache24/files/patch-docs__conf__extra__httpd-autoindex.conf.in
new file mode 100644
index 000000000000..79d4f20790e9
--- /dev/null
+++ b/www/apache24/files/patch-docs__conf__extra__httpd-autoindex.conf.in
@@ -0,0 +1,9 @@
+--- ./docs/conf/extra/httpd-autoindex.conf.in.orig 2010-06-15 13:05:13.000000000 +0200
++++ ./docs/conf/extra/httpd-autoindex.conf.in 2013-03-22 18:55:53.000000000 +0100
+@@ -89,5 +89,5 @@
+ # IndexIgnore is a set of filenames which directory indexing should ignore
+ # and not include in the listing. Shell-style wildcarding is permitted.
+ #
+-IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
++IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t *.bak *.orig
+
diff --git a/www/apache24/files/patch-docs__conf__extra__httpd-ssl.conf.in b/www/apache24/files/patch-docs__conf__extra__httpd-ssl.conf.in
new file mode 100644
index 000000000000..8382aa1a1b81
--- /dev/null
+++ b/www/apache24/files/patch-docs__conf__extra__httpd-ssl.conf.in
@@ -0,0 +1,22 @@
+--- ./docs/conf/extra/httpd-ssl.conf.in.orig 2012-12-11 10:55:03.000000000 +0100
++++ ./docs/conf/extra/httpd-ssl.conf.in 2013-03-22 18:55:53.000000000 +0100
+@@ -86,8 +86,8 @@
+ DocumentRoot "@exp_htdocsdir@"
+ ServerName www.example.com:@@SSLPort@@
+ ServerAdmin you@example.com
+-ErrorLog "@exp_logfiledir@/error_log"
+-TransferLog "@exp_logfiledir@/access_log"
++ErrorLog "@exp_logfiledir@/httpd-error.log"
++TransferLog "@exp_logfiledir@/httpd-access.log"
+
+ # SSL Engine Switch:
+ # Enable/Disable SSL for this virtual host.
+@@ -246,7 +246,7 @@
+ # 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 "@exp_logfiledir@/ssl_request_log" \
++CustomLog "@exp_logfiledir@/httpd-ssl_request.log" \
+ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
+
+ </VirtualHost>
diff --git a/www/apache24/files/patch-docs__conf__extra__httpd-userdir.conf.in b/www/apache24/files/patch-docs__conf__extra__httpd-userdir.conf.in
new file mode 100644
index 000000000000..d071f5388568
--- /dev/null
+++ b/www/apache24/files/patch-docs__conf__extra__httpd-userdir.conf.in
@@ -0,0 +1,11 @@
+--- ./docs/conf/extra/httpd-userdir.conf.in.orig 2011-06-06 23:40:41.000000000 +0200
++++ ./docs/conf/extra/httpd-userdir.conf.in 2013-03-22 18:55:53.000000000 +0100
+@@ -9,6 +9,8 @@
+ #
+ UserDir public_html
+
++UserDir disabled %%FTPUSERS%%
++
+ #
+ # Control access to UserDir directories. The following is an example
+ # for a site where these directories are restricted to read-only.
diff --git a/www/apache24/files/patch-docs__conf__httpd.conf.in b/www/apache24/files/patch-docs__conf__httpd.conf.in
new file mode 100644
index 000000000000..a246f6924ce0
--- /dev/null
+++ b/www/apache24/files/patch-docs__conf__httpd.conf.in
@@ -0,0 +1,49 @@
+--- ./docs/conf/httpd.conf.in.orig 2012-11-08 04:05:38.000000000 +0100
++++ ./docs/conf/httpd.conf.in 2013-03-22 18:55:53.000000000 +0100
+@@ -74,8 +74,8 @@
+ # It is usually good practice to create a dedicated user and group for
+ # running httpd, as with most system services.
+ #
+-User daemon
+-Group daemon
++User %%WWWOWN%%
++Group %%WWWGRP%%
+
+ </IfModule>
+
+@@ -181,7 +181,7 @@
+ # 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 "@rel_logfiledir@/error_log"
++ErrorLog "@rel_logfiledir@/httpd-error.log"
+
+ #
+ # LogLevel: Control the number of messages logged to the error_log.
+@@ -210,13 +210,13 @@
+ # define per-<VirtualHost> access logfiles, transactions will be
+ # logged therein and *not* in this file.
+ #
+- CustomLog "@rel_logfiledir@/access_log" common
++ CustomLog "@rel_logfiledir@/httpd-access.log" common
+
+ #
+ # If you prefer a logfile with access, agent, and referer information
+ # (Combined Logfile Format) you can use the following directive.
+ #
+- #CustomLog "@rel_logfiledir@/access_log" combined
++ #CustomLog "@rel_logfiledir@/httpd-access.log" combined
+ </IfModule>
+
+ <IfModule alias_module>
+@@ -406,7 +406,9 @@
+ SSLRandomSeed startup builtin
+ SSLRandomSeed connect builtin
+ </IfModule>
+-#
++
++Include @rel_sysconfdir@/Includes/*.conf
++
+ # uncomment out the below to deal with user agents that deliberately
+ # violate open standards by misusing DNT (DNT *must* be a specific
+ # end-user choice)
diff --git a/www/apache24/files/patch-support__Makefile.in b/www/apache24/files/patch-support__Makefile.in
new file mode 100644
index 000000000000..072be110c10f
--- /dev/null
+++ b/www/apache24/files/patch-support__Makefile.in
@@ -0,0 +1,33 @@
+--- ./support/Makefile.in.orig 2012-12-11 11:37:25.000000000 +0100
++++ ./support/Makefile.in 2013-03-22 18:55:53.000000000 +0100
+@@ -17,23 +17,23 @@
+ @test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
+ @test -d $(DESTDIR)$(libexecdir) || $(MKINSTALLDIRS) $(DESTDIR)$(libexecdir)
+ @cp -p $(top_builddir)/server/httpd.exp $(DESTDIR)$(libexecdir)
+- @for i in apxs dbmmanage; do \
++ @chown root:wheel $(DESTDIR)$(libexecdir)/httpd.exp
++ @for i in apxs dbmmanage split-logfile; do \
+ if test -f "$(builddir)/$$i"; then \
+- cp -p $$i $(DESTDIR)$(bindir); \
+- chmod 755 $(DESTDIR)$(bindir)/$$i; \
++ cp -p $$i $(DESTDIR)$(sbindir); \
++ chmod 755 $(DESTDIR)$(sbindir)/$$i; \
++ chown root:wheel $(DESTDIR)$(sbindir)/$$i; \
+ fi ; \
+ done
+ @for i in apachectl; do \
+ if test -f "$(builddir)/$$i"; then \
+ cp -p $$i $(DESTDIR)$(sbindir); \
+ chmod 755 $(DESTDIR)$(sbindir)/$$i; \
++ chown root:wheel $(DESTDIR)$(sbindir)/$$i; \
+ fi ; \
+ done
+ @if test -f "$(builddir)/envvars-std"; then \
+- cp -p envvars-std $(DESTDIR)$(sbindir); \
+- if test ! -f $(DESTDIR)$(sbindir)/envvars; then \
+- cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
+- fi ; \
++ cp -p envvars-std $(DESTDIR)$(sbindir)/envvars; \
+ fi
+
+ htpasswd.lo: passwd_common.h
diff --git a/www/apache24/files/patch-support__apachectl.in b/www/apache24/files/patch-support__apachectl.in
new file mode 100644
index 000000000000..7d9f5521aeed
--- /dev/null
+++ b/www/apache24/files/patch-support__apachectl.in
@@ -0,0 +1,10 @@
+--- ./support/apachectl.in.orig 2012-02-01 04:47:28.000000000 +0100
++++ ./support/apachectl.in 2013-03-22 18:55:53.000000000 +0100
+@@ -66,6 +66,7 @@
+ # -------------------- --------------------
+ # |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
+
++eval `limits -e -C daemon` >/dev/null 2>&1
+ # Set the maximum number of file descriptors allowed per child process.
+ if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
+ $ULIMIT_MAX_FILES
diff --git a/www/apache24/files/patch-support__apxs.in b/www/apache24/files/patch-support__apxs.in
new file mode 100644
index 000000000000..ab8f38f159eb
--- /dev/null
+++ b/www/apache24/files/patch-support__apxs.in
@@ -0,0 +1,27 @@
+--- ./support/apxs.in.orig 2012-07-25 13:42:40.000000000 +0200
++++ ./support/apxs.in 2013-03-22 18:55:53.000000000 +0100
+@@ -636,7 +636,13 @@
+ }
+ } else {
+ # replace already existing LoadModule line
+- $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
++ # Custom FreeBSD mod
++ if ($opt_A) {
++ $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1|s;
++ }
++ else {
++ $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
++ }
+ }
+ $lmd =~ m|LoadModule\s+(.+?)_module.*|;
+ notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");
+@@ -645,8 +651,7 @@
+ 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 && " .
++ system("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");
diff --git a/www/apache24/files/patch-support__envvars-std.in b/www/apache24/files/patch-support__envvars-std.in
new file mode 100644
index 000000000000..9f428b238547
--- /dev/null
+++ b/www/apache24/files/patch-support__envvars-std.in
@@ -0,0 +1,13 @@
+--- ./support/envvars-std.in.orig 2012-03-08 17:10:51.000000000 +0100
++++ ./support/envvars-std.in 2013-03-22 18:55:53.000000000 +0100
+@@ -26,3 +26,10 @@
+ export @SHLIBPATH_VAR@
+ #
+ @OS_SPECIFIC_VARS@
++
++ENVVARS_DIR=%%PREFIX%%/etc/apache24/envvars.d
++
++for envvars_file in $(ls ${ENVVARS_DIR}/*.env 2>/dev/null)
++do
++ . ${envvars_file}
++done
diff --git a/www/apache24/files/patch-support__log_server_status.in b/www/apache24/files/patch-support__log_server_status.in
new file mode 100644
index 000000000000..3d3ba66f7128
--- /dev/null
+++ b/www/apache24/files/patch-support__log_server_status.in
@@ -0,0 +1,20 @@
+--- ./support/log_server_status.in.orig 2012-04-29 01:08:09.000000000 +0200
++++ ./support/log_server_status.in 2013-03-22 18:55:53.000000000 +0100
+@@ -29,7 +29,7 @@
+ use strict;
+ use warnings;
+
+-my $wherelog = "@exp_logfiledir@/"; # Logs will be like "@exp_logfiledir@/19960312"
++my $wherelog = "@exp_logfiledir@/httpd-status-"; # Logs will be like "@exp_logfiledir@/httpd-status-19960312"
+ my $server = "localhost"; # Name of server, could be "www.foo.com"
+ my $port = "@PORT@"; # Port on server
+ my $request = "/server-status/?auto"; # Request to send
+@@ -46,7 +46,7 @@
+ . sprintf( "%02d", $ltime[1] )
+ . sprintf( "%02d", $ltime[0] );
+
+-open(OUT,">>$wherelog$day");
++open(OUT,">>$wherelog$day.log");
+
+ my $socket = new IO::Socket::INET(
+ PeerAddr => $server,