summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--00-base.conf77
-rw-r--r--00-dav.conf3
-rw-r--r--00-lua.conf1
-rw-r--r--00-mpm.conf19
-rw-r--r--00-proxy.conf15
-rw-r--r--00-proxyhtml.conf3
-rw-r--r--00-ssl.conf1
-rw-r--r--01-cgi.conf14
-rw-r--r--01-ldap.conf3
-rw-r--r--README.confd9
-rw-r--r--httpd-2.0.48-release.patch16
-rw-r--r--httpd-2.4.1-apctl.patch94
-rw-r--r--httpd-2.4.1-apr14.patch22
-rw-r--r--httpd-2.4.1-apxs.patch56
-rw-r--r--httpd-2.4.1-corelimit.patch35
-rw-r--r--httpd-2.4.1-deplibs.patch19
-rw-r--r--httpd-2.4.1-export.patch20
-rw-r--r--httpd-2.4.1-layout.patch29
-rw-r--r--httpd-2.4.1-selinux.patch61
-rw-r--r--httpd-2.4.1-suenable.patch18
-rwxr-xr-xhttpd-ssl-pass-dialog3
-rw-r--r--httpd.conf351
-rw-r--r--httpd.logrotate9
-rw-r--r--httpd.service16
-rw-r--r--httpd.spec706
-rw-r--r--httpd.sysconf25
-rw-r--r--httpd.tmpfiles1
-rw-r--r--index.html130
-rw-r--r--manual.conf11
-rw-r--r--ssl.conf218
-rw-r--r--userdir.conf36
-rw-r--r--welcome.conf18
32 files changed, 2039 insertions, 0 deletions
diff --git a/00-base.conf b/00-base.conf
new file mode 100644
index 0000000..32d9567
--- /dev/null
+++ b/00-base.conf
@@ -0,0 +1,77 @@
+#
+# This file loads most of the modules included with the Apache HTTP
+# Server itself.
+#
+
+LoadModule access_compat_module modules/mod_access_compat.so
+LoadModule actions_module modules/mod_actions.so
+LoadModule alias_module modules/mod_alias.so
+LoadModule allowmethods_module modules/mod_allowmethods.so
+LoadModule auth_basic_module modules/mod_auth_basic.so
+LoadModule auth_digest_module modules/mod_auth_digest.so
+LoadModule authn_anon_module modules/mod_authn_anon.so
+LoadModule authn_core_module modules/mod_authn_core.so
+LoadModule authn_dbd_module modules/mod_authn_dbd.so
+LoadModule authn_dbm_module modules/mod_authn_dbm.so
+LoadModule authn_file_module modules/mod_authn_file.so
+LoadModule authn_socache_module modules/mod_authn_socache.so
+LoadModule authz_core_module modules/mod_authz_core.so
+LoadModule authz_dbd_module modules/mod_authz_dbd.so
+LoadModule authz_dbm_module modules/mod_authz_dbm.so
+LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
+LoadModule authz_host_module modules/mod_authz_host.so
+LoadModule authz_owner_module modules/mod_authz_owner.so
+LoadModule authz_user_module modules/mod_authz_user.so
+LoadModule autoindex_module modules/mod_autoindex.so
+LoadModule cache_module modules/mod_cache.so
+LoadModule cache_disk_module modules/mod_cache_disk.so
+LoadModule data_module modules/mod_data.so
+LoadModule dbd_module modules/mod_dbd.so
+LoadModule deflate_module modules/mod_deflate.so
+LoadModule dir_module modules/mod_dir.so
+LoadModule dumpio_module modules/mod_dumpio.so
+LoadModule echo_module modules/mod_echo.so
+LoadModule env_module modules/mod_env.so
+LoadModule expires_module modules/mod_expires.so
+LoadModule ext_filter_module modules/mod_ext_filter.so
+LoadModule filter_module modules/mod_filter.so
+LoadModule headers_module modules/mod_headers.so
+LoadModule include_module modules/mod_include.so
+LoadModule info_module modules/mod_info.so
+LoadModule log_config_module modules/mod_log_config.so
+LoadModule logio_module modules/mod_logio.so
+LoadModule mime_magic_module modules/mod_mime_magic.so
+LoadModule mime_module modules/mod_mime.so
+LoadModule negotiation_module modules/mod_negotiation.so
+LoadModule remoteip_module modules/mod_remoteip.so
+LoadModule reqtimeout_module modules/mod_reqtimeout.so
+LoadModule rewrite_module modules/mod_rewrite.so
+LoadModule setenvif_module modules/mod_setenvif.so
+LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
+LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
+LoadModule socache_dbm_module modules/mod_socache_dbm.so
+LoadModule socache_memcache_module modules/mod_socache_memcache.so
+LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
+LoadModule status_module modules/mod_status.so
+LoadModule substitute_module modules/mod_substitute.so
+LoadModule suexec_module modules/mod_suexec.so
+LoadModule unique_id_module modules/mod_unique_id.so
+LoadModule unixd_module modules/mod_unixd.so
+LoadModule userdir_module modules/mod_userdir.so
+LoadModule version_module modules/mod_version.so
+LoadModule vhost_alias_module modules/mod_vhost_alias.so
+
+#LoadModule auth_form_module modules/mod_auth_form.so
+#LoadModule buffer_module modules/mod_buffer.so
+#LoadModule watchdog_module modules/mod_watchdog.so
+#LoadModule heartbeat_module modules/mod_heartbeat.so
+#LoadModule heartmonitor_module modules/mod_heartmonitor.so
+#LoadModule usertrack_module modules/mod_usertrack.so
+#LoadModule dialup_module modules/mod_dialup.so
+#LoadModule charset_lite_module modules/mod_charset_lite.so
+#LoadModule log_debug_module modules/mod_log_debug.so
+#LoadModule ratelimit_module modules/mod_ratelimit.so
+#LoadModule reflector_module modules/mod_reflector.so
+#LoadModule request_module modules/mod_request.so
+#LoadModule sed_module modules/mod_sed.so
+#LoadModule speling_module modules/mod_speling.so
diff --git a/00-dav.conf b/00-dav.conf
new file mode 100644
index 0000000..e6af8de
--- /dev/null
+++ b/00-dav.conf
@@ -0,0 +1,3 @@
+LoadModule dav_module modules/mod_dav.so
+LoadModule dav_fs_module modules/mod_dav_fs.so
+LoadModule dav_lock_module modules/mod_dav_lock.so
diff --git a/00-lua.conf b/00-lua.conf
new file mode 100644
index 0000000..9e0d0db
--- /dev/null
+++ b/00-lua.conf
@@ -0,0 +1 @@
+LoadModule lua_module modules/mod_lua.so
diff --git a/00-mpm.conf b/00-mpm.conf
new file mode 100644
index 0000000..7bfd1d4
--- /dev/null
+++ b/00-mpm.conf
@@ -0,0 +1,19 @@
+# Select the MPM module which should be used by uncommenting exactly
+# one of the following LoadModule lines:
+
+# prefork MPM: Implements a non-threaded, pre-forking web server
+# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
+LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
+
+# worker MPM: Multi-Processing Module implementing a hybrid
+# multi-threaded multi-process web server
+# See: http://httpd.apache.org/docs/2.4/mod/worker.html
+#
+#LoadModule mpm_worker_module modules/mod_mpm_worker.so
+
+# event MPM: A variant of the worker MPM with the goal of consuming
+# threads only for connections with active processing
+# See: http://httpd.apache.org/docs/2.4/mod/event.html
+#
+#LoadModule mpm_event_module modules/mod_mpm_event.so
+
diff --git a/00-proxy.conf b/00-proxy.conf
new file mode 100644
index 0000000..a446822
--- /dev/null
+++ b/00-proxy.conf
@@ -0,0 +1,15 @@
+# This file configures all the proxy modules:
+LoadModule proxy_module modules/mod_proxy.so
+LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
+LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
+LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
+LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
+LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
+LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
+LoadModule proxy_connect_module modules/mod_proxy_connect.so
+LoadModule proxy_express_module modules/mod_proxy_express.so
+LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
+LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
+LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
+LoadModule proxy_http_module modules/mod_proxy_http.so
+LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
diff --git a/00-proxyhtml.conf b/00-proxyhtml.conf
new file mode 100644
index 0000000..9a9b107
--- /dev/null
+++ b/00-proxyhtml.conf
@@ -0,0 +1,3 @@
+# This file configures mod_proxy_html and mod_xml2enc:
+LoadModule xml2enc_module modules/mod_xml2enc.so
+LoadModule proxy_html_module modules/mod_proxy_html.so
diff --git a/00-ssl.conf b/00-ssl.conf
new file mode 100644
index 0000000..53235cd
--- /dev/null
+++ b/00-ssl.conf
@@ -0,0 +1 @@
+LoadModule ssl_module modules/mod_ssl.so
diff --git a/01-cgi.conf b/01-cgi.conf
new file mode 100644
index 0000000..5b8b936
--- /dev/null
+++ b/01-cgi.conf
@@ -0,0 +1,14 @@
+# This configuration file loads a CGI module appropriate to the MPM
+# which has been configured in 00-mpm.conf. mod_cgid should be used
+# with a threaded MPM; mod_cgi with the prefork MPM.
+
+<IfModule mpm_worker_module>
+ LoadModule cgid_module modules/mod_cgid.so
+</IfModule>
+<IfModule mpm_event_module>
+ LoadModule cgid_module modules/mod_cgid.so
+</IfModule>
+<IfModule mpm_prefork_module>
+ LoadModule cgi_module modules/mod_cgi.so
+</IfModule>
+
diff --git a/01-ldap.conf b/01-ldap.conf
new file mode 100644
index 0000000..f2ac2a2
--- /dev/null
+++ b/01-ldap.conf
@@ -0,0 +1,3 @@
+# This file configures the LDAP modules:
+LoadModule ldap_module modules/mod_ldap.so
+LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
diff --git a/README.confd b/README.confd
new file mode 100644
index 0000000..f5e9661
--- /dev/null
+++ b/README.confd
@@ -0,0 +1,9 @@
+
+This directory holds configuration files for the Apache HTTP Server;
+any files in this directory which have the ".conf" extension will be
+processed as httpd configuration files. The directory is used in
+addition to the directory /etc/httpd/conf.modules.d/, which contains
+configuration files necessary to load modules.
+
+Files are processed in alphabetical order.
+
diff --git a/httpd-2.0.48-release.patch b/httpd-2.0.48-release.patch
new file mode 100644
index 0000000..fd6fd2b
--- /dev/null
+++ b/httpd-2.0.48-release.patch
@@ -0,0 +1,16 @@
+
+Upstream-HEAD: vendor
+Upstream-2.0: vendor
+Upstream-Status: vendor-specific change
+
+--- httpd-2.0.48/server/core.c.release
++++ httpd-2.0.48/server/core.c
+@@ -2758,7 +2758,7 @@
+ ap_add_version_component(pconf, AP_SERVER_BASEPRODUCT "/" AP_SERVER_MAJORVERSION);
+ }
+ else {
+- ap_add_version_component(pconf, AP_SERVER_BASEVERSION " (" PLATFORM ")");
++ ap_add_version_component(pconf, AP_SERVER_BASEVERSION " (@RELEASE@)");
+ }
+
+ /*
diff --git a/httpd-2.4.1-apctl.patch b/httpd-2.4.1-apctl.patch
new file mode 100644
index 0000000..b31c3c5
--- /dev/null
+++ b/httpd-2.4.1-apctl.patch
@@ -0,0 +1,94 @@
+
+- fail gracefully if links is not installed on target system
+- source sysconfig/httpd for custom env. vars etc.
+- make httpd -t work even in SELinux
+- pass $OPTIONS to all $HTTPD invocation
+
+Upstream-HEAD: vendor
+Upstream-2.0: vendor
+Upstream-Status: Vendor-specific changes for better initscript integration
+
+--- httpd-2.4.1/support/apachectl.in.apctl
++++ httpd-2.4.1/support/apachectl.in
+@@ -44,19 +44,25 @@ ARGV="$@"
+ # the path to your httpd binary, including options if necessary
+ HTTPD='@exp_sbindir@/@progname@'
+ #
+-# pick up any necessary environment variables
+-if test -f @exp_sbindir@/envvars; then
+- . @exp_sbindir@/envvars
+-fi
+ #
+ # 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 "@LYNX_PATH@" ]; then
++ LYNX="@LYNX_PATH@ -dump"
++else
++ LYNX=none
++fi
+ #
+ # the URL to your server's mod_status status page. If you do not
+ # have one, then status and fullstatus will not work.
+ STATUSURL="http://localhost:@PORT@/server-status"
++
++# Source /etc/sysconfig/httpd for $HTTPD setting, etc.
++if [ -r /etc/sysconfig/httpd ]; then
++ . /etc/sysconfig/httpd
++fi
++
+ #
+ # Set this variable to a command that increases the maximum
+ # number of file descriptors allowed per child process. This is
+@@ -76,9 +82,27 @@ if [ "x$ARGV" = "x" ] ; then
+ ARGV="-h"
+ fi
+
++function checklynx() {
++if [ "$LYNX" = "none" ]; then
++ echo "The 'links' package is required for this functionality."
++ exit 8
++fi
++}
++
++function testconfig() {
++# httpd is denied terminal access in SELinux, so run in the
++# current context to get stdout from $HTTPD -t.
++if test -x /usr/sbin/selinuxenabled && /usr/sbin/selinuxenabled; then
++ runcon -- `id -Z` $HTTPD $OPTIONS -t
++else
++ $HTTPD $OPTIONS -t
++fi
++ERROR=$?
++}
++
+ case $ACMD in
+ start|stop|restart|graceful|graceful-stop)
+- $HTTPD -k $ARGV
++ $HTTPD $OPTIONS -k $ARGV
+ ERROR=$?
+ ;;
+ startssl|sslstart|start-SSL)
+@@ -88,17 +112,18 @@ startssl|sslstart|start-SSL)
+ ERROR=2
+ ;;
+ configtest)
+- $HTTPD -t
+- ERROR=$?
++ testconfig
+ ;;
+ status)
++ checklynx
+ $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
+ ;;
+ fullstatus)
++ checklynx
+ $LYNX $STATUSURL
+ ;;
+ *)
+- $HTTPD "$@"
++ $HTTPD $OPTIONS "$@"
+ ERROR=$?
+ esac
+
diff --git a/httpd-2.4.1-apr14.patch b/httpd-2.4.1-apr14.patch
new file mode 100644
index 0000000..4f685f3
--- /dev/null
+++ b/httpd-2.4.1-apr14.patch
@@ -0,0 +1,22 @@
+--- httpd-2.4.1/support/rotatelogs.c.apr14
++++ httpd-2.4.1/support/rotatelogs.c
+@@ -52,6 +52,7 @@
+ #if APR_FILES_AS_SOCKETS
+ #include "apr_poll.h"
+ #endif
++#include "apr_version.h"
+
+ #if APR_HAVE_STDLIB_H
+ #include <stdlib.h>
+@@ -295,7 +296,11 @@ static void post_rotate(apr_pool_t *pool
+ if (config->verbose) {
+ fprintf(stderr,"Linking %s to %s\n", newlog->name, config->linkfile);
+ }
++#if APR_VERSION_AT_LEAST(1,4,0)
+ rv = apr_file_link(newlog->name, config->linkfile);
++#else
++ rv = APR_ENOTIMPL;
++#endif
+ if (rv != APR_SUCCESS) {
+ char error[120];
+ apr_strerror(rv, error, sizeof error);
diff --git a/httpd-2.4.1-apxs.patch b/httpd-2.4.1-apxs.patch
new file mode 100644
index 0000000..62003ec
--- /dev/null
+++ b/httpd-2.4.1-apxs.patch
@@ -0,0 +1,56 @@
+--- httpd-2.4.1/support/apxs.in.apxs
++++ httpd-2.4.1/support/apxs.in
+@@ -25,7 +25,18 @@ package apxs;
+
+ my %config_vars = ();
+
+-my $installbuilddir = "@exp_installbuilddir@";
++# Awful hack to make apxs libdir-agnostic:
++my $pkg_config = "/usr/bin/pkg-config";
++if (! -x "$pkg_config") {
++ error("$pkg_config not found!");
++ exit(1);
++}
++
++my $libdir = `pkg-config --variable=libdir apr-1`;
++chomp $libdir;
++
++my $installbuilddir = $libdir . "/httpd/build";
++
+ get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
+
+ # read the configuration variables once
+@@ -273,7 +284,7 @@ if ($opt_g) {
+ $data =~ s|%NAME%|$name|sg;
+ $data =~ s|%TARGET%|$CFG_TARGET|sg;
+ $data =~ s|%PREFIX%|$prefix|sg;
+- $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
++ $data =~ s|%LIBDIR%|$libdir|sg;
+
+ my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s);
+
+@@ -450,11 +461,11 @@ if ($opt_c) {
+
+ if ($opt_p == 1) {
+
+- my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
++ my $apr_libs=`$apr_config --cflags --ldflags --link-libtool`;
+ chomp($apr_libs);
+ my $apu_libs="";
+ if ($apr_major_version < 2) {
+- $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
++ $apu_libs=`$apu_config --ldflags --link-libtool`;
+ chomp($apu_libs);
+ }
+
+@@ -669,8 +680,8 @@ __DATA__
+
+ builddir=.
+ top_srcdir=%PREFIX%
+-top_builddir=%PREFIX%
+-include %INSTALLBUILDDIR%/special.mk
++top_builddir=%LIBDIR%/httpd
++include %LIBDIR%/httpd/build/special.mk
+
+ # the used tools
+ APXS=apxs
diff --git a/httpd-2.4.1-corelimit.patch b/httpd-2.4.1-corelimit.patch
new file mode 100644
index 0000000..96f8486
--- /dev/null
+++ b/httpd-2.4.1-corelimit.patch
@@ -0,0 +1,35 @@
+
+Bump up the core size limit if CoreDumpDirectory is
+configured.
+
+Upstream-Status: Was discussed but there are competing desires;
+ there are portability oddities here too.
+
+--- httpd-2.4.1/server/core.c.corelimit
++++ httpd-2.4.1/server/core.c
+@@ -4433,6 +4433,25 @@ static int core_post_config(apr_pool_t *
+ }
+ apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper,
+ apr_pool_cleanup_null);
++
++#ifdef RLIMIT_CORE
++ if (ap_coredumpdir_configured) {
++ struct rlimit lim;
++
++ if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) {
++ lim.rlim_cur = lim.rlim_max;
++ if (setrlimit(RLIMIT_CORE, &lim) == 0) {
++ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
++ "core dump file size limit raised to %lu bytes",
++ lim.rlim_cur);
++ } else {
++ ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL,
++ "core dump file size is zero, setrlimit failed");
++ }
++ }
++ }
++#endif
++
+ return OK;
+ }
+
diff --git a/httpd-2.4.1-deplibs.patch b/httpd-2.4.1-deplibs.patch
new file mode 100644
index 0000000..b73c21d
--- /dev/null
+++ b/httpd-2.4.1-deplibs.patch
@@ -0,0 +1,19 @@
+
+Link straight against .la files.
+
+Upstream-Status: vendor specific
+
+--- httpd-2.4.1/configure.in.deplibs
++++ httpd-2.4.1/configure.in
+@@ -707,9 +707,9 @@ APACHE_HELP_STRING(--with-suexec-umask,u
+
+ dnl APR should go after the other libs, so the right symbols can be picked up
+ if test x${apu_found} != xobsolete; then
+- AP_LIBS="$AP_LIBS `$apu_config --avoid-ldap --link-libtool --libs`"
++ AP_LIBS="$AP_LIBS `$apu_config --avoid-ldap --link-libtool`"
+ fi
+-AP_LIBS="$AP_LIBS `$apr_config --link-libtool --libs`"
++AP_LIBS="$AP_LIBS `$apr_config --link-libtool`"
+ APACHE_SUBST(AP_LIBS)
+ APACHE_SUBST(AP_BUILD_SRCLIB_DIRS)
+ APACHE_SUBST(AP_CLEAN_SRCLIB_DIRS)
diff --git a/httpd-2.4.1-export.patch b/httpd-2.4.1-export.patch
new file mode 100644
index 0000000..2c1a884
--- /dev/null
+++ b/httpd-2.4.1-export.patch
@@ -0,0 +1,20 @@
+
+There is no need to "suck in" the apr/apr-util symbols when using
+a shared libapr{,util}, it just bloats the symbol table; so don't.
+
+Upstream-HEAD: needed
+Upstream-2.0: omit
+Upstream-Status: EXPORT_DIRS change is conditional on using shared apr
+
+--- httpd-2.4.1/server/Makefile.in.export
++++ httpd-2.4.1/server/Makefile.in
+@@ -57,9 +57,6 @@ export_files:
+ ( for dir in $(EXPORT_DIRS); do \
+ ls $$dir/*.h ; \
+ done; \
+- for dir in $(EXPORT_DIRS_APR); do \
+- ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
+- done; \
+ ) | sort -u > $@
+
+ exports.c: export_files
diff --git a/httpd-2.4.1-layout.patch b/httpd-2.4.1-layout.patch
new file mode 100644
index 0000000..b1dcf5c
--- /dev/null
+++ b/httpd-2.4.1-layout.patch
@@ -0,0 +1,29 @@
+--- httpd-2.4.1/config.layout.layout
++++ httpd-2.4.1/config.layout
+@@ -347,3 +347,26 @@
+ proxycachedir: ${localstatedir}/proxy
+ </Layout>
+
++# Fedora/RHEL layout
++<Layout Fedora>
++ prefix: /usr
++ exec_prefix: ${prefix}
++ bindir: ${prefix}/bin
++ sbindir: ${prefix}/sbin
++ libdir: ${prefix}/lib
++ libexecdir: ${prefix}/libexec
++ mandir: ${prefix}/man
++ sysconfdir: /etc/httpd/conf
++ datadir: ${prefix}/share/httpd
++ installbuilddir: ${libdir}/httpd/build
++ errordir: ${datadir}/error
++ iconsdir: ${datadir}/icons
++ htdocsdir: /var/www/html
++ manualdir: ${datadir}/manual
++ cgidir: /var/www/cgi-bin
++ includedir: ${prefix}/include/httpd
++ localstatedir: /var
++ runtimedir: ${localstatedir}/run/httpd
++ logfiledir: ${localstatedir}/log/httpd
++ proxycachedir: ${localstatedir}/cache/httpd
++</Layout>
diff --git a/httpd-2.4.1-selinux.patch b/httpd-2.4.1-selinux.patch
new file mode 100644
index 0000000..e97c5a4
--- /dev/null
+++ b/httpd-2.4.1-selinux.patch
@@ -0,0 +1,61 @@
+
+Log the SELinux context at startup.
+
+Upstream-Status: unlikely to be any interest in this upstream
+
+--- httpd-2.4.1/configure.in.selinux
++++ httpd-2.4.1/configure.in
+@@ -458,6 +458,11 @@ fopen64
+ dnl confirm that a void pointer is large enough to store a long integer
+ APACHE_CHECK_VOID_PTR_LEN
+
++AC_CHECK_LIB(selinux, is_selinux_enabled, [
++ AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported])
++ APR_ADDTO(AP_LIBS, [-lselinux])
++])
++
+ AC_CACHE_CHECK([for gettid()], ac_cv_gettid,
+ [AC_TRY_RUN(#define _GNU_SOURCE
+ #include <unistd.h>
+--- httpd-2.4.1/server/core.c.selinux
++++ httpd-2.4.1/server/core.c
+@@ -58,6 +58,10 @@
+ #include <unistd.h>
+ #endif
+
++#ifdef HAVE_SELINUX
++#include <selinux/selinux.h>
++#endif
++
+ /* LimitRequestBody handling */
+ #define AP_LIMIT_REQ_BODY_UNSET ((apr_off_t) -1)
+ #define AP_DEFAULT_LIMIT_REQ_BODY ((apr_off_t) 0)
+@@ -4452,6 +4456,28 @@ static int core_post_config(apr_pool_t *
+ }
+ #endif
+
++#ifdef HAVE_SELINUX
++ {
++ static int already_warned = 0;
++ int is_enabled = is_selinux_enabled() > 0;
++
++ if (is_enabled && !already_warned) {
++ security_context_t con;
++
++ if (getcon(&con) == 0) {
++
++ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
++ "SELinux policy enabled; "
++ "httpd running as context %s", con);
++
++ already_warned = 1;
++
++ freecon(con);
++ }
++ }
++ }
++#endif
++
+ return OK;
+ }
+
diff --git a/httpd-2.4.1-suenable.patch b/httpd-2.4.1-suenable.patch
new file mode 100644
index 0000000..f2287fd
--- /dev/null
+++ b/httpd-2.4.1-suenable.patch
@@ -0,0 +1,18 @@
+Removes setuid check because we are now using capabilities to ensure proper
+suexec rights.
+
+Upstream-status: vendor specific.
+
+diff --git a/os/unix/unixd.c b/os/unix/unixd.c
+index 85d5a98..1ee1dfe 100644
+--- httpd-2.4.1/modules/arch/unix/mod_unixd.c.suenable
++++ httpd-2.4.1/modules/arch/unix/mod_unixd.c
+@@ -300,7 +300,7 @@ unixd_pre_config(apr_pool_t *pconf, apr_
+ ap_unixd_config.suexec_enabled = 0;
+ if ((apr_stat(&wrapper, SUEXEC_BIN, APR_FINFO_NORM, ptemp))
+ == APR_SUCCESS) {
+- if ((wrapper.protection & APR_USETID) && wrapper.user == 0
++ if (wrapper.user == 0
+ && (access(SUEXEC_BIN, R_OK|X_OK) == 0)) {
+ ap_unixd_config.suexec_enabled = 1;
+ ap_unixd_config.suexec_disabled_reason = "";
diff --git a/httpd-ssl-pass-dialog b/httpd-ssl-pass-dialog
new file mode 100755
index 0000000..1e850cd
--- /dev/null
+++ b/httpd-ssl-pass-dialog
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /bin/systemd-ask-password "Enter SSL pass phrase for $1 ($2) : "
diff --git a/httpd.conf b/httpd.conf
new file mode 100644
index 0000000..1f973bb
--- /dev/null
+++ b/httpd.conf
@@ -0,0 +1,351 @@
+#
+# This is the main Apache HTTP server configuration file. It contains the
+# configuration directives that give the server its instructions.
+# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
+# In particular, see
+# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
+# for a discussion of each configuration directive.
+#
+# 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.
+#
+# Configuration and logfile names: If the filenames you specify for many
+# of the server's control files begin with "/" (or "drive:/" for Win32), the
+# server will use that explicit path. If the filenames do *not* begin
+# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
+# with ServerRoot set to '/www' will be interpreted by the
+# server as '/www/log/access_log', where as '/log/access_log' will be
+# interpreted as '/log/access_log'.
+
+#
+# ServerRoot: The top of the directory tree under which the server's
+# configuration, error, and log files are kept.
+#
+# Do not add a slash at the end of the directory path. If you point
+# ServerRoot at a non-local disk, be sure to specify a local disk on the
+# Mutex directive, if file-based mutexes are used. If you wish to share the
+# same ServerRoot for multiple httpd daemons, you will need to change at
+# least PidFile.
+#
+ServerRoot "/etc/httpd"
+
+#
+# Listen: Allows you to bind Apache to specific IP addresses and/or
+# ports, instead of the default. See also the <VirtualHost>
+# directive.
+#
+# Change this to Listen on specific IP addresses as shown below to
+# prevent Apache from glomming onto all bound IP addresses.
+#
+#Listen 12.34.56.78:80
+Listen 80
+
+#
+# Dynamic Shared Object (DSO) Support
+#
+# To be able to use the functionality of a module which was built as a DSO you
+# have to place corresponding `LoadModule' lines at this location so the
+# directives contained in it are actually available _before_ they are used.
+# Statically compiled modules (those listed by `httpd -l') do not need
+# to be loaded here.
+#
+# Example:
+# LoadModule foo_module modules/mod_foo.so
+#
+Include conf.modules.d/*.conf
+
+#
+# If you wish httpd to run as a different user or group, you must run
+# httpd as root initially and it will switch.
+#
+# User/Group: The name (or #number) of the user/group to run httpd as.
+# It is usually good practice to create a dedicated user and group for
+# running httpd, as with most system services.
+#
+User apache
+Group apache
+
+# '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.
+#
+
+#
+# ServerAdmin: Your address, where problems with the server should be
+# e-mailed. This address appears on some server-generated pages, such
+# as error documents. e.g. admin@your-domain.com
+#
+ServerAdmin root@localhost
+
+#
+# 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 your host doesn't have a registered DNS name, enter its IP address here.
+#
+#ServerName www.example.com:80
+
+#
+# Deny access to the entirety of your server's filesystem. You must
+# explicitly permit access to web content directories in other
+# <Directory> blocks below.
+#
+<Directory />
+ AllowOverride none
+ Require all denied
+</Directory>
+
+#
+# Note that from this point forward you must specifically allow
+# particular features to be enabled - so if something's not working as
+# you might expect, make sure that you have specifically enabled it
+# below.
+#
+
+#
+# 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 "/var/www/html"
+
+#
+# Relax access to content within /var/www.
+#
+<Directory "/var/www">
+ AllowOverride None
+ # Allow open access:
+ Require all granted
+</Directory>
+
+# Further relax access to the default document root:
+<Directory "/var/www/html">
+ #
+ # 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.4/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.
+ #
+ Require all granted
+</Directory>
+
+#
+# DirectoryIndex: sets the file that Apache will serve if a directory
+# is requested.
+#
+<IfModule dir_module>
+ DirectoryIndex index.html
+</IfModule>
+
+#
+# The following lines prevent .htaccess and .htpasswd files from being
+# viewed by Web clients.
+#
+<Files ".ht*">
+ Require all denied
+</Files>
+
+#
+# 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 "logs/error_log"
+
+#
+# LogLevel: Control the number of messages logged to the error_log.
+# Possible values include: debug, info, notice, warn, error, crit,
+# alert, emerg.
+#
+LogLevel warn
+
+<IfModule log_config_module>
+ #
+ # The following directives define some format nicknames for use with
+ # a CustomLog directive (see below).
+ #
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+ LogFormat "%h %l %u %t \"%r\" %>s %b" common
+
+ <IfModule logio_module>
+ # You need to enable mod_logio.c to use %I and %O
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
+ </IfModule>
+
+ #
+ # 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. Contrariwise, if you *do*
+ # define per-<VirtualHost> access logfiles, transactions will be
+ # logged therein and *not* in this file.
+ #
+ #CustomLog "logs/access_log" common
+
+ #
+ # If you prefer a logfile with access, agent, and referer information
+ # (Combined Logfile Format) you can use the following directive.
+ #
+ CustomLog "logs/access_log" combined
+</IfModule>
+
+<IfModule alias_module>
+ #
+ # Redirect: Allows you to tell clients about documents that used to
+ # exist in your server's namespace, but do not anymore. The client
+ # will make a new request for the document at its new location.
+ # Example:
+ # Redirect permanent /foo http://www.example.com/bar
+
+ #
+ # Alias: Maps web paths into filesystem paths and is used to
+ # access content that does not live under the DocumentRoot.
+ # Example:
+ # Alias /webpath /full/filesystem/path
+ #
+ # If you include a trailing / on /webpath then the server will
+ # require it to be present in the URL. You will also likely
+ # need to provide a <Directory> section to allow access to
+ # the filesystem path.
+
+ #
+ # ScriptAlias: This controls which directories contain server scripts.
+ # ScriptAliases are essentially the same as Aliases, except that
+ # documents in the target 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/ "/var/www/cgi-bin/"
+
+</IfModule>
+
+#
+# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
+# CGI directory exists, if you have that configured.
+#
+<Directory "/var/www/cgi-bin">
+ AllowOverride None
+ Options None
+ Require all granted
+</Directory>
+
+<IfModule mime_module>
+ #
+ # TypesConfig points to the file containing the list of mappings from
+ # filename extension to MIME-type.
+ #
+ TypesConfig /etc/mime.types
+
+ #
+ # AddType allows you to add to or override the MIME configuration
+ # file specified in TypesConfig for specific file types.
+ #
+ #AddType application/x-gzip .tgz
+ #
+ # AddEncoding allows you to have certain browsers uncompress
+ # information on the fly. Note: Not all browsers support this.
+ #
+ #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
+
+ #
+ # AddHandler allows you to map certain file extensions to "handlers":
+ # actions unrelated to filetype. These can be either built into the server
+ # or added with the Action directive (see below)
+ #
+ # To use CGI scripts outside of ScriptAliased directories:
+ # (You will also need to add "ExecCGI" to the "Options" directive.)
+ #
+ #AddHandler cgi-script .cgi
+
+ # For type maps (negotiated resources):
+ #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
+</IfModule>
+
+#
+# Specify a default charset for all content served; this enables
+# interpretation of all content as UTF-8 by default. To use the
+# default browser choice (ISO-8859-1), or to allow the META tags
+# in HTML content to override this choice, comment out this
+# directive:
+#
+AddDefaultCharset UTF-8
+
+#
+# The mod_mime_magic module allows the server to use various hints from the
+# contents of the file itself to determine its type. The MIMEMagicFile
+# directive tells the module where the hint definitions are located.
+#
+MIMEMagicFile conf/magic
+
+#
+# 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
+#
+
+#
+# EnableMMAP and EnableSendfile: On systems that support it,
+# memory-mapping or the sendfile syscall may be used to deliver
+# files. This usually improves server performance, but must
+# be turned off when serving from networked-mounted
+# filesystems or if support for these functions is otherwise
+# broken on your system.
+# Defaults if commented: EnableMMAP On, EnableSendfile Off
+#
+#EnableMMAP off
+EnableSendfile on
+
+# Supplemental configuration
+#
+# Load conf files in the "/etc/httpd/conf.d" directory.
+Include conf.d/*.conf
diff --git a/httpd.logrotate b/httpd.logrotate
new file mode 100644
index 0000000..794b9d7
--- /dev/null
+++ b/httpd.logrotate
@@ -0,0 +1,9 @@
+/var/log/httpd/*log {
+ missingok
+ notifempty
+ sharedscripts
+ delaycompress
+ postrotate
+ /sbin/service httpd reload > /dev/null 2>/dev/null || true
+ endscript
+}
diff --git a/httpd.service b/httpd.service
new file mode 100644
index 0000000..fda59d2
--- /dev/null
+++ b/httpd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=The Apache HTTP Server
+After=syslog.target network.target remote-fs.target nss-lookup.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/httpd/httpd.pid
+EnvironmentFile=/etc/sysconfig/httpd
+ExecStart=/usr/sbin/httpd $OPTIONS
+ExecReload=/usr/sbin/httpd $OPTIONS -t
+ExecReload=/usr/sbin/httpd -HUP $MAINPID
+ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/httpd.spec b/httpd.spec
new file mode 100644
index 0000000..c22a94f
--- /dev/null
+++ b/httpd.spec
@@ -0,0 +1,706 @@
+%define contentdir %{_datadir}/httpd
+%define docroot /var/www
+%define suexec_caller apache
+%define mmn 20120211
+%define mmnisa %{mmn}-%{__isa_name}-%{__isa_bits}
+%define vstring Fedora
+
+Summary: Apache HTTP Server
+Name: httpd
+Version: 2.4.1
+Release: 6%{?dist}
+URL: http://httpd.apache.org/
+Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
+Source1: index.html
+Source3: httpd.logrotate
+Source5: httpd.sysconf
+Source6: httpd-ssl-pass-dialog
+Source7: httpd.tmpfiles
+Source8: httpd.service
+Source10: httpd.conf
+Source11: 00-base.conf
+Source12: 00-mpm.conf
+Source13: 00-lua.conf
+Source14: 01-cgi.conf
+Source15: 00-dav.conf
+Source16: 00-proxy.conf
+Source17: 00-ssl.conf
+Source18: 01-ldap.conf
+Source19: 00-proxyhtml.conf
+Source20: userdir.conf
+Source21: ssl.conf
+Source22: welcome.conf
+Source23: manual.conf
+# Documentation
+Source30: README.confd
+# build/scripts patches
+Patch1: httpd-2.4.1-apctl.patch
+Patch2: httpd-2.4.1-apxs.patch
+Patch3: httpd-2.4.1-deplibs.patch
+Patch5: httpd-2.4.1-layout.patch
+Patch6: httpd-2.4.1-apr14.patch
+# Features/functional changes
+Patch20: httpd-2.0.48-release.patch
+Patch23: httpd-2.4.1-export.patch
+Patch24: httpd-2.4.1-corelimit.patch
+Patch25: httpd-2.4.1-selinux.patch
+Patch26: httpd-2.4.1-suenable.patch
+License: ASL 2.0
+Group: System Environment/Daemons
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRequires: autoconf, perl, pkgconfig, findutils, xmlto
+BuildRequires: zlib-devel, libselinux-devel, lua-devel
+BuildRequires: apr-devel >= 1.2.0, apr-util-devel >= 1.2.0, pcre-devel >= 5.0
+Requires: /etc/mime.types, system-logos >= 7.92.1-1
+Obsoletes: httpd-suexec
+Provides: webserver
+Provides: mod_dav = %{version}-%{release}, httpd-suexec = %{version}-%{release}
+Provides: httpd-mmn = %{mmn}, httpd-mmn = %{mmnisa}
+Requires: httpd-tools = %{version}-%{release}
+Requires(pre): /usr/sbin/useradd
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+Requires(post): systemd-units
+
+%description
+The Apache HTTP Server is a powerful, efficient, and extensible
+web server.
+
+%package devel
+Group: Development/Libraries
+Summary: Development interfaces for the Apache HTTP server
+Obsoletes: secureweb-devel, apache-devel, stronghold-apache-devel
+Requires: apr-devel, apr-util-devel, pkgconfig
+Requires: httpd = %{version}-%{release}
+
+%description devel
+The httpd-devel package contains the APXS binary and other files
+that you need to build Dynamic Shared Objects (DSOs) for the
+Apache HTTP Server.
+
+If you are installing the Apache HTTP server and you want to be
+able to compile or develop additional modules for Apache, you need
+to install this package.
+
+%package manual
+Group: Documentation
+Summary: Documentation for the Apache HTTP server
+Requires: httpd = %{version}-%{release}
+Obsoletes: secureweb-manual, apache-manual
+BuildArch: noarch
+
+%description manual
+The httpd-manual package contains the complete manual and
+reference guide for the Apache HTTP server. The information can
+also be found at http://httpd.apache.org/docs/2.2/.
+
+%package tools
+Group: System Environment/Daemons
+Summary: Tools for use with the Apache HTTP Server
+
+%description tools
+The httpd-tools package contains tools which can be used with
+the Apache HTTP Server.
+
+%package -n mod_ssl
+Group: System Environment/Daemons
+Summary: SSL/TLS module for the Apache HTTP Server
+Epoch: 1
+BuildRequires: openssl-devel
+Requires(post): openssl, /bin/cat
+Requires(pre): httpd
+Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
+Obsoletes: stronghold-mod_ssl
+
+%description -n mod_ssl
+The mod_ssl module provides strong cryptography for the Apache Web
+server via the Secure Sockets Layer (SSL) and Transport Layer
+Security (TLS) protocols.
+
+%package -n mod_proxy_html
+Group: System Environment/Daemons
+Summary: HTML and XML content filters for the Apache HTTP Server
+Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
+BuildRequires: libxml2-devel
+Epoch: 1
+Obsoletes: mod_proxy_html < 1:2.4.1-2
+
+%description -n mod_proxy_html
+The mod_proxy_html and mod_xml2enc modules provide filters which can
+transform and modify HTML and XML content.
+
+%package -n mod_ldap
+Group: System Environment/Daemons
+Summary: LDAP authentication modules for the Apache HTTP Server
+Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmnisa}
+Requires: apr-util-ldap
+
+%description -n mod_ldap
+The mod_ldap and mod_authnz_ldap modules add support for LDAP
+authentication to the Apache HTTP Server.
+
+%prep
+%setup -q
+%patch1 -p1 -b .apctl
+%patch2 -p1 -b .apxs
+%patch3 -p1 -b .deplibs
+%patch5 -p1 -b .layout
+%patch6 -p1 -b .apr14
+
+%patch23 -p1 -b .export
+%patch24 -p1 -b .corelimit
+%patch25 -p1 -b .selinux
+%patch26 -p1 -b .suenable
+
+# Patch in vendor/release string
+sed "s/@RELEASE@/%{vstring}/" < %{PATCH20} | patch -p1
+
+# Safety check: prevent build if defined MMN does not equal upstream MMN.
+vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include include/ap_mmn.h | sed -n '/^2/p'`
+if test "x${vmmn}" != "x%{mmn}"; then
+ : Error: Upstream MMN is now ${vmmn}, packaged MMN is %{mmn}
+ : Update the mmn macro and rebuild.
+ exit 1
+fi
+
+: Building with MMN %{mmn}, MMN-ISA %{mmnisa} and vendor string '%{vstring}'
+
+%build
+# forcibly prevent use of bundled apr, apr-util, pcre
+rm -rf srclib/{apr,apr-util,pcre}
+
+# regenerate configure scripts
+autoheader && autoconf || exit 1
+
+# Before configure; fix location of build dir in generated apxs
+%{__perl} -pi -e "s:\@exp_installbuilddir\@:%{_libdir}/httpd/build:g" \
+ support/apxs.in
+
+export CFLAGS=$RPM_OPT_FLAGS
+export LDFLAGS="-Wl,-z,relro,-z,now"
+
+# Hard-code path to links to avoid unnecessary builddep
+export LYNX_PATH=/usr/bin/links
+
+# Build the daemon
+./configure \
+ --prefix=%{_sysconfdir}/httpd \
+ --exec-prefix=%{_prefix} \
+ --bindir=%{_bindir} \
+ --sbindir=%{_sbindir} \
+ --mandir=%{_mandir} \
+ --libdir=%{_libdir} \
+ --sysconfdir=%{_sysconfdir}/httpd/conf \
+ --includedir=%{_includedir}/httpd \
+ --libexecdir=%{_libdir}/httpd/modules \
+ --datadir=%{contentdir} \
+ --enable-layout=Fedora \
+ --with-installbuilddir=%{_libdir}/httpd/build \
+ --enable-mpms-shared=all \
+ --with-apr=%{_prefix} --with-apr-util=%{_prefix} \
+ --enable-suexec --with-suexec \
+ --with-suexec-caller=%{suexec_caller} \
+ --with-suexec-docroot=%{docroot} \
+ --with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \
+ --with-suexec-bin=%{_sbindir}/suexec \
+ --with-suexec-uidmin=500 --with-suexec-gidmin=100 \
+ --enable-pie \
+ --with-pcre \
+ --enable-mods-shared=all \
+ --enable-ssl --with-ssl --disable-distcache \
+ --enable-proxy \
+ --enable-cache \
+ --enable-disk-cache \
+ --enable-ldap --enable-authnz-ldap \
+ --enable-cgid --enable-cgi \
+ --enable-authn-anon --enable-authn-alias \
+ --disable-imagemap \
+ --disable-session
+ $*
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# Install systemd service files
+mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
+install -p -m 644 $RPM_SOURCE_DIR/httpd.service \
+ $RPM_BUILD_ROOT/lib/systemd/system/httpd.service
+
+# install conf file/directory
+mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d \
+ $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d
+install -m 644 $RPM_SOURCE_DIR/README.confd \
+ $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/README
+for f in 00-base.conf 00-mpm.conf 00-lua.conf 01-cgi.conf 00-dav.conf \
+ 00-proxy.conf 00-ssl.conf 01-ldap.conf 00-proxyhtml.conf \
+ 01-ldap.conf; do
+ install -m 644 -p $RPM_SOURCE_DIR/$f \
+ $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/$f
+done
+
+for f in welcome.conf ssl.conf manual.conf userdir.conf; do
+ install -m 644 -p $RPM_SOURCE_DIR/$f \
+ $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/$f
+done
+
+# Split-out extra config shipped as default in conf.d:
+for f in autoindex; do
+ mv docs/conf/extra/httpd-${f}.conf \
+ $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/${f}.conf
+done
+
+# Extra config trimmed:
+rm -v docs/conf/extra/httpd-{ssl,userdir}.conf
+
+rm $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/*.conf
+install -m 644 -p $RPM_SOURCE_DIR/httpd.conf \
+ $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/httpd.conf
+
+mkdir $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
+install -m 644 -p $RPM_SOURCE_DIR/httpd.sysconf \
+ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/httpd
+
+# tmpfiles.d configuration
+mkdir $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d
+install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
+ $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/httpd.conf
+
+# for holding mod_dav lock database
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav
+
+# Create cache directory
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd \
+ $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd/proxy \
+ $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd/ssl
+
+# Make the MMN accessible to module packages
+echo %{mmnisa} > $RPM_BUILD_ROOT%{_includedir}/httpd/.mmn
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.httpd <<EOF
+%%_httpd_mmn %{mmnisa}
+%%_httpd_apxs %%{_bindir}/apxs
+%%_httpd_modconfdir %%{_sysconfdir}/httpd/conf.modules.d
+%%_httpd_confdir %%{_sysconfdir}/httpd/conf.d
+%%_httpd_contentdir %{contentdir}
+%%_httpd_moddir %%{_libdir}/httpd/modules
+EOF
+
+# Handle contentdir
+mkdir $RPM_BUILD_ROOT%{contentdir}/noindex
+install -m 644 -p $RPM_SOURCE_DIR/index.html \
+ $RPM_BUILD_ROOT%{contentdir}/noindex/index.html
+rm -rf %{contentdir}/htdocs
+
+# remove manual sources
+find $RPM_BUILD_ROOT%{contentdir}/manual \( \
+ -name \*.xml -o -name \*.xml.* -o -name \*.ent -o -name \*.xsl -o -name \*.dtd \
+ \) -print0 | xargs -0 rm -f
+
+# Strip the manual down just to English and replace the typemaps with flat files:
+set +x
+for f in `find $RPM_BUILD_ROOT%{contentdir}/manual -name \*.html -type f`; do
+ if test -f ${f}.en; then
+ cp ${f}.en ${f}
+ rm ${f}.*
+ fi
+done
+set -x
+
+# Clean Document Root
+rm -v $RPM_BUILD_ROOT%{docroot}/html/*.html \
+ $RPM_BUILD_ROOT%{docroot}/cgi-bin/*
+
+# Symlink for the powered-by-$DISTRO image:
+ln -s ../../pixmaps/poweredby.png \
+ $RPM_BUILD_ROOT%{contentdir}/icons/poweredby.png
+
+# symlinks for /etc/httpd
+ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
+ln -s ../..%{_localstatedir}/run/httpd $RPM_BUILD_ROOT/etc/httpd/run
+ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
+
+# install http-ssl-pass-dialog
+mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}
+install -m755 $RPM_SOURCE_DIR/httpd-ssl-pass-dialog \
+ $RPM_BUILD_ROOT/%{_libexecdir}/httpd-ssl-pass-dialog
+
+# Install logrotate config
+mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
+install -m 644 -p $RPM_SOURCE_DIR/httpd.logrotate \
+ $RPM_BUILD_ROOT/etc/logrotate.d/httpd
+
+# fix man page paths
+sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/httpd/conf/httpd.conf|" \
+ -e "s|/usr/local/apache2/conf/mime.types|/etc/mime.types|" \
+ -e "s|/usr/local/apache2/conf/magic|/etc/httpd/conf/magic|" \
+ -e "s|/usr/local/apache2/logs/error_log|/var/log/httpd/error_log|" \
+ -e "s|/usr/local/apache2/logs/access_log|/var/log/httpd/access_log|" \
+ -e "s|/usr/local/apache2/logs/httpd.pid|/var/run/httpd/httpd.pid|" \
+ -e "s|/usr/local/apache2|/etc/httpd|" < docs/man/httpd.8 \
+ > $RPM_BUILD_ROOT%{_mandir}/man8/httpd.8
+
+# Make ap_config_layout.h libdir-agnostic
+sed -i '/.*DEFAULT_..._LIBEXECDIR/d;/DEFAULT_..._INSTALLBUILDDIR/d' \
+ $RPM_BUILD_ROOT%{_includedir}/httpd/ap_config_layout.h
+
+# Fix path to instdso in special.mk
+sed -i '/instdso/s,top_srcdir,top_builddir,' \
+ $RPM_BUILD_ROOT%{_libdir}/httpd/build/special.mk
+
+# Remove unpackaged files
+rm -vf \
+ $RPM_BUILD_ROOT%{_libdir}/*.exp \
+ $RPM_BUILD_ROOT/etc/httpd/conf/mime.types \
+ $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.exp \
+ $RPM_BUILD_ROOT%{_libdir}/httpd/build/config.nice \
+ $RPM_BUILD_ROOT%{_bindir}/ap?-config \
+ $RPM_BUILD_ROOT%{_sbindir}/{checkgid,dbmmanage,envvars*} \
+ $RPM_BUILD_ROOT%{contentdir}/htdocs/* \
+ $RPM_BUILD_ROOT%{_mandir}/man1/dbmmanage.* \
+ $RPM_BUILD_ROOT%{contentdir}/cgi-bin/*
+
+rm -rf $RPM_BUILD_ROOT/etc/httpd/conf/{original,extra}
+
+# Make suexec a+rw so it can be stripped. %%files lists real permissions
+chmod 755 $RPM_BUILD_ROOT%{_sbindir}/suexec
+
+%pre
+# Add the "apache" user
+/usr/sbin/useradd -c "Apache" -u 48 \
+ -s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || :
+
+%post
+# Register the httpd service
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable %{all_services} > /dev/null 2>&1 || :
+ /bin/systemctl stop %{all_services} > /dev/null 2>&1 || :
+fi
+
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
+# Trigger for conversion from SysV, per guidelines at:
+# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
+%triggerun -- httpd < 2.2.21-5
+# Save the current service runlevel info
+# User must manually run systemd-sysv-convert --apply httpd
+# to migrate them to systemd targets
+/usr/bin/systemd-sysv-convert --save httpd.service >/dev/null 2>&1 ||:
+
+# Run these because the SysV package being removed won't do them
+/sbin/chkconfig --del httpd >/dev/null 2>&1 || :
+
+%posttrans
+/bin/systemctl try-restart httpd.service >/dev/null 2>&1 || :
+
+%define sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt
+%define sslkey %{_sysconfdir}/pki/tls/private/localhost.key
+
+%post -n mod_ssl
+umask 077
+
+if [ -f %{sslkey} -o -f %{sslcert} ]; then
+ exit 0
+fi
+
+%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{sslkey} 2> /dev/null
+
+FQDN=`hostname`
+if [ "x${FQDN}" = "x" ]; then
+ FQDN=localhost.localdomain
+fi
+
+cat << EOF | %{_bindir}/openssl req -new -key %{sslkey} \
+ -x509 -days 365 -set_serial $RANDOM -extensions v3_req \
+ -out %{sslcert} 2>/dev/null
+--
+SomeState
+SomeCity
+SomeOrganization
+SomeOrganizationalUnit
+${FQDN}
+root@${FQDN}
+EOF
+
+%check
+# Check the built modules are all PIC
+if readelf -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.so | grep TEXTREL; then
+ : modules contain non-relocatable code
+ exit 1
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+
+%doc ABOUT_APACHE README CHANGES LICENSE VERSIONING NOTICE
+%doc docs/conf/extra/*.conf
+
+%dir %{_sysconfdir}/httpd
+%{_sysconfdir}/httpd/modules
+%{_sysconfdir}/httpd/logs
+%{_sysconfdir}/httpd/run
+%dir %{_sysconfdir}/httpd/conf
+%config(noreplace) %{_sysconfdir}/httpd/conf/httpd.conf
+%config(noreplace) %{_sysconfdir}/httpd/conf/magic
+
+%config(noreplace) %{_sysconfdir}/logrotate.d/httpd
+
+%dir %{_sysconfdir}/httpd/conf.d
+%{_sysconfdir}/httpd/conf.d/README
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
+%exclude %{_sysconfdir}/httpd/conf.d/ssl.conf
+%exclude %{_sysconfdir}/httpd/conf.d/manual.conf
+
+%dir %{_sysconfdir}/httpd/conf.modules.d
+%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/*.conf
+%exclude %{_sysconfdir}/httpd/conf.modules.d/00-ssl.conf
+%exclude %{_sysconfdir}/httpd/conf.modules.d/00-proxyhtml.conf
+%exclude %{_sysconfdir}/httpd/conf.modules.d/01-ldap.conf
+
+%config(noreplace) %{_sysconfdir}/sysconfig/httpd
+%config %{_sysconfdir}/tmpfiles.d/httpd.conf
+
+%{_sbindir}/ht*
+%{_sbindir}/fcgistarter
+%{_sbindir}/apachectl
+%{_sbindir}/rotatelogs
+# cap_dac_override needed to write to /var/log/httpd
+%caps(cap_setuid,cap_setgid,cap_dac_override+pe) %attr(510,root,%{suexec_caller}) %{_sbindir}/suexec
+
+%dir %{_libdir}/httpd
+%dir %{_libdir}/httpd/modules
+%{_libdir}/httpd/modules/mod*.so
+%exclude %{_libdir}/httpd/modules/mod_ssl.so
+%exclude %{_libdir}/httpd/modules/mod_*ldap.so
+%exclude %{_libdir}/httpd/modules/mod_proxy_html.so
+%exclude %{_libdir}/httpd/modules/mod_xml2enc.so
+
+%dir %{contentdir}
+%dir %{contentdir}/icons
+%dir %{contentdir}/error
+%dir %{contentdir}/error/include
+%dir %{contentdir}/noindex
+%{contentdir}/icons/*
+%{contentdir}/error/README
+%{contentdir}/error/*.var
+%{contentdir}/error/include/*.html
+%{contentdir}/noindex/index.html
+
+%dir %{docroot}/cgi-bin
+%dir %{docroot}/html
+
+%attr(0710,root,apache) %dir %{_localstatedir}/run/httpd
+%attr(0700,root,root) %dir %{_localstatedir}/log/httpd
+%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav
+%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd
+%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd/proxy
+
+%{_mandir}/man8/*
+
+/lib/systemd/system/*.service
+
+%files tools
+%defattr(-,root,root)
+%{_bindir}/*
+%{_mandir}/man1/*
+%doc LICENSE NOTICE
+%exclude %{_bindir}/apxs
+
+%files manual
+%defattr(-,root,root)
+%{contentdir}/manual
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/manual.conf
+
+%files -n mod_ssl
+%defattr(-,root,root)
+%{_libdir}/httpd/modules/mod_ssl.so
+%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/00-ssl.conf
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/ssl.conf
+%attr(0700,apache,root) %dir %{_localstatedir}/cache/httpd/ssl
+%{_libexecdir}/httpd-ssl-pass-dialog
+
+%files -n mod_proxy_html
+%defattr(-,root,root)
+%{_libdir}/httpd/modules/mod_proxy_html.so
+%{_libdir}/httpd/modules/mod_xml2enc.so
+%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/00-proxyhtml.conf
+
+%files -n mod_ldap
+%defattr(-,root,root)
+%{_libdir}/httpd/modules/mod_*ldap.so
+%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/01-ldap.conf
+
+%files devel
+%defattr(-,root,root)
+%{_includedir}/httpd
+%{_bindir}/apxs
+%{_mandir}/man1/apxs.1*
+%dir %{_libdir}/httpd/build
+%{_libdir}/httpd/build/*.mk
+%{_libdir}/httpd/build/*.sh
+%{_sysconfdir}/rpm/macros.httpd
+
+%changelog
+* Fri Mar 23 2012 Joe Orton <jorton@redhat.com> - 2.4.1-6
+- fix macros
+
+* Fri Mar 23 2012 Joe Orton <jorton@redhat.com> - 2.4.1-5
+- add _httpd_moddir to macros
+
+* Tue Mar 13 2012 Joe Orton <jorton@redhat.com> - 2.4.1-4
+- fix symlink for poweredby.png
+- fix manual.conf
+
+* Tue Mar 13 2012 Joe Orton <jorton@redhat.com> - 2.4.1-3
+- add mod_proxy_html subpackage (w/mod_proxy_html + mod_xml2enc)
+- move mod_ldap, mod_authnz_ldap to mod_ldap subpackage
+
+* Tue Mar 13 2012 Joe Orton <jorton@redhat.com> - 2.4.1-2
+- clean docroot better
+- ship proxy, ssl directories within /var/cache/httpd
+- default config:
+ * unrestricted access to (only) /var/www
+ * remove (commented) Mutex, MaxRanges, ScriptSock
+ * split autoindex config to conf.d/autoindex.conf
+- ship additional example configs in docdir
+
+* Tue Mar 6 2012 Joe Orton <jorton@redhat.com> - 2.4.1-1
+- update to 2.4.1
+- adopt upstream default httpd.conf (almost verbatim)
+- split all LoadModules to conf.modules.d/*.conf
+- include conf.d/*.conf at end of httpd.conf
+- trim %%changelog
+
+* Mon Feb 13 2012 Joe Orton <jorton@redhat.com> - 2.2.22-2
+- fix build against PCRE 8.30
+
+* Mon Feb 13 2012 Joe Orton <jorton@redhat.com> - 2.2.22-1
+- update to 2.2.22
+
+* Fri Feb 10 2012 Petr Pisar <ppisar@redhat.com> - 2.2.21-8
+- Rebuild against PCRE 8.30
+
+* Mon Jan 23 2012 Jan Kaluza <jkaluza@redhat.com> - 2.2.21-7
+- fix #783629 - start httpd after named
+
+* Mon Jan 16 2012 Joe Orton <jorton@redhat.com> - 2.2.21-6
+- complete conversion to systemd, drop init script (#770311)
+- fix comments in /etc/sysconfig/httpd (#771024)
+- enable PrivateTmp in service file (#781440)
+- set LANG=C in /etc/sysconfig/httpd
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.21-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Tue Dec 06 2011 Jan Kaluza <jkaluza@redhat.com> - 2.2.21-4
+- fix #751591 - start httpd after remote-fs
+
+* Mon Oct 24 2011 Jan Kaluza <jkaluza@redhat.com> - 2.2.21-3
+- allow change state of BalancerMember in mod_proxy_balancer web interface
+
+* Thu Sep 22 2011 Ville Skyttä <ville.skytta@iki.fi> - 2.2.21-2
+- Make mmn available as %%{_httpd_mmn}.
+- Add .svgz to AddEncoding x-gzip example in httpd.conf.
+
+* Tue Sep 13 2011 Joe Orton <jorton@redhat.com> - 2.2.21-1
+- update to 2.2.21
+
+* Mon Sep 5 2011 Joe Orton <jorton@redhat.com> - 2.2.20-1
+- update to 2.2.20
+- fix MPM stub man page generation
+
+* Wed Aug 10 2011 Jan Kaluza <jkaluza@redhat.com> - 2.2.19-5
+- fix #707917 - add httpd-ssl-pass-dialog to ask for SSL password using systemd
+
+* Fri Jul 22 2011 Iain Arnell <iarnell@gmail.com> 1:2.2.19-4
+- rebuild while rpm-4.9.1 is untagged to remove trailing slash in provided
+ directory names
+
+* Wed Jul 20 2011 Jan Kaluza <jkaluza@redhat.com> - 2.2.19-3
+- fix #716621 - suexec now works without setuid bit
+
+* Thu Jul 14 2011 Jan Kaluza <jkaluza@redhat.com> - 2.2.19-2
+- fix #689091 - backported patch from 2.3 branch to support IPv6 in logresolve
+
+* Fri Jul 1 2011 Joe Orton <jorton@redhat.com> - 2.2.19-1
+- update to 2.2.19
+- enable dbd, authn_dbd in default config
+
+* Thu Apr 14 2011 Joe Orton <jorton@redhat.com> - 2.2.17-13
+- fix path expansion in service files
+
+* Tue Apr 12 2011 Joe Orton <jorton@redhat.com> - 2.2.17-12
+- add systemd service files (#684175, thanks to Jóhann B. Guðmundsson)
+
+* Wed Mar 23 2011 Joe Orton <jorton@redhat.com> - 2.2.17-11
+- minor updates to httpd.conf
+- drop old patches
+
+* Wed Mar 2 2011 Joe Orton <jorton@redhat.com> - 2.2.17-10
+- rebuild
+
+* Wed Feb 23 2011 Joe Orton <jorton@redhat.com> - 2.2.17-9
+- use arch-specific mmn
+
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.17-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Mon Jan 31 2011 Joe Orton <jorton@redhat.com> - 2.2.17-7
+- generate dummy mod_ssl cert with CA:FALSE constraint (#667841)
+- add man page stubs for httpd.event, httpd.worker
+- drop distcache support
+- add STOP_TIMEOUT support to init script
+
+* Sat Jan 8 2011 Joe Orton <jorton@redhat.com> - 2.2.17-6
+- update default SSLCipherSuite per upstream trunk
+
+* Wed Jan 5 2011 Joe Orton <jorton@redhat.com> - 2.2.17-5
+- fix requires (#667397)
+
+* Wed Jan 5 2011 Joe Orton <jorton@redhat.com> - 2.2.17-4
+- de-ghost /var/run/httpd
+
+* Tue Jan 4 2011 Joe Orton <jorton@redhat.com> - 2.2.17-3
+- add tmpfiles.d configuration, ghost /var/run/httpd (#656600)
+
+* Sat Nov 20 2010 Joe Orton <jorton@redhat.com> - 2.2.17-2
+- drop setuid bit, use capabilities for suexec binary
+
+* Wed Oct 27 2010 Joe Orton <jorton@redhat.com> - 2.2.17-1
+- update to 2.2.17
+
+* Fri Sep 10 2010 Joe Orton <jorton@redhat.com> - 2.2.16-2
+- link everything using -z relro and -z now
+
+* Mon Jul 26 2010 Joe Orton <jorton@redhat.com> - 2.2.16-1
+- update to 2.2.16
+
+* Fri Jul 9 2010 Joe Orton <jorton@redhat.com> - 2.2.15-3
+- default config tweaks:
+ * harden httpd.conf w.r.t. .htaccess restriction (#591293)
+ * load mod_substitute, mod_version by default
+ * drop proxy_ajp.conf, load mod_proxy_ajp in httpd.conf
+ * add commented list of shipped-but-unloaded modules
+ * bump up worker defaults a little
+ * drop KeepAliveTimeout to 5 secs per upstream
+- fix LSB compliance in init script (#522074)
+- bundle NOTICE in -tools
+- use init script in logrotate postrotate to pick up PIDFILE
+- drop some old Obsoletes/Conflicts
+
+* Sun Apr 04 2010 Robert Scheck <robert@fedoraproject.org> - 2.2.15-1
+- update to 2.2.15 (#572404, #579311)
+
diff --git a/httpd.sysconf b/httpd.sysconf
new file mode 100644
index 0000000..1b38411
--- /dev/null
+++ b/httpd.sysconf
@@ -0,0 +1,25 @@
+#
+# This file can be used to set additional environment variables for
+# the httpd process, or pass additional options to the httpd
+# executable.
+#
+# Note: With previous versions of httpd, the MPM could be changed by
+# editing an "HTTPD" variable here. With the current version, that
+# variable is now ignored. The MPM is a loadable module, and the
+# choice of MPM can be changed by editing the configuration file
+# /etc/httpd/conf.modules.d/00-mpm.conf.
+#
+
+#
+# To pass additional options (for instance, -D definitions) to the
+# httpd binary at startup, set OPTIONS here.
+#
+#OPTIONS=
+
+#
+# This setting ensures the httpd process is started in the "C" locale
+# by default. (Some modules will not behave correctly if
+# case-sensitive string comparisons are performed in a different
+# locale.)
+#
+LANG=C
diff --git a/httpd.tmpfiles b/httpd.tmpfiles
new file mode 100644
index 0000000..0cad373
--- /dev/null
+++ b/httpd.tmpfiles
@@ -0,0 +1 @@
+d /var/run/httpd 710 root apache
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..5dfe52d
--- /dev/null
+++ b/index.html
@@ -0,0 +1,130 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title>Test Page for the Apache HTTP Server on Fedora</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ /*<![CDATA[*/
+ body {
+ background-color: #fff;
+ color: #000;
+ font-size: 0.9em;
+ font-family: sans-serif,helvetica;
+ margin: 0;
+ padding: 0;
+ }
+ :link {
+ color: #c00;
+ }
+ :visited {
+ color: #c00;
+ }
+ a:hover {
+ color: #f50;
+ }
+ h1 {
+ text-align: center;
+ margin: 0;
+ padding: 0.6em 2em 0.4em;
+ background-color: #22437f;
+ color: #fff;
+ font-weight: normal;
+ font-size: 1.75em;
+ border-bottom: 2px solid #000;
+ }
+ h1 strong {
+ font-weight: bold;
+ }
+ h2 {
+ font-size: 1.1em;
+ font-weight: bold;
+ }
+ hr {
+ display: none;
+ }
+ .content {
+ padding: 1em 5em;
+ }
+ .content-columns {
+ /* Setting relative positioning allows for
+ absolute positioning for sub-classes */
+ position: relative;
+ padding-top: 1em;
+ }
+ .content-column-left {
+ /* Value for IE/Win; will be overwritten for other browsers */
+ width: 47%;
+ padding-right: 3%;
+ float: left;
+ padding-bottom: 2em;
+ }
+ .content-column-left hr {
+ display: none;
+ }
+ .content-column-right {
+ /* Values for IE/Win; will be overwritten for other browsers */
+ width: 47%;
+ padding-left: 3%;
+ float: left;
+ padding-bottom: 2em;
+ }
+ .content-columns>.content-column-left, .content-columns>.content-column-right {
+ /* Non-IE/Win */
+ }
+ img {
+ border: 2px solid #fff;
+ padding: 2px;
+ margin: 2px;
+ }
+ a:hover img {
+ border: 2px solid #f50;
+ }
+ /*]]>*/
+ </style>
+ </head>
+
+ <body>
+ <h1>Fedora <strong>Test Page</strong></h1>
+
+ <div class="content">
+ <div class="content-middle">
+ <p>This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page, it means that the web server installed at this site is working properly, but has not yet been configured.</p>
+ </div>
+ <hr />
+
+ <div class="content-columns">
+ <div class="content-column-left">
+ <h2>If you are a member of the general public:</h2>
+
+ <p>The fact that you are seeing this page indicates that the website you just visited is either experiencing problems, or is undergoing routine maintenance.</p>
+
+ <p>If you would like to let the administrators of this website know that you've seen this page instead of the page you expected, you should send them e-mail. In general, mail sent to the name "webmaster" and directed to the website's domain should reach the appropriate person.</p>
+
+ <p>For example, if you experienced problems while visiting www.example.com, you should send e-mail to "webmaster@example.com".</p>
+
+ <p>Fedora is a distribution of Linux, a popular computer operating system. It is commonly used by hosting companies because it is free, and includes free web server software. Many times, they do not set up their web server correctly, and it displays this "test page" instead of the expected website.
+
+ <p>Accordingly, please keep these facts in mind:
+ <li>Neither the Fedora Project or Red Hat has any affiliation with any website or content hosted from this server (unless otherwise explicitly stated).</li>
+ <li>Neither the Fedora Project or Red Hat has "hacked" this webserver, this test page is an included component of Apache's httpd webserver software.</li>
+
+ <p>For more information about Fedora, please visit the <a href="http://fedoraproject.org/">Fedora Project website</a>.</p>
+ <hr />
+ </div>
+
+ <div class="content-column-right">
+ <h2>If you are the website administrator:</h2>
+
+ <p>You may now add content to the directory <tt>/var/www/html/</tt>. Note that until you do so, people visiting your website will see this page, and not your content. To prevent this page from ever being used, follow the instructions in the file <tt>/etc/httpd/conf.d/welcome.conf</tt>.</p>
+
+ <div class="logos">
+ <p>You are free to use the images below on Apache and Fedora powered HTTP servers. Thanks for using Apache and Fedora!</p>
+
+ <p><a href="http://httpd.apache.org/"><img src="/icons/apache_pb2.gif" alt="[ Powered by Apache ]"/></a> <a href="http://fedoraproject.org/"><img src="/icons/poweredby.png" alt="[ Powered by Fedora ]" width="88" height="31" /></a></p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/manual.conf b/manual.conf
new file mode 100644
index 0000000..d09757d
--- /dev/null
+++ b/manual.conf
@@ -0,0 +1,11 @@
+#
+# This configuration file allows the manual to be accessed at
+# http://localhost/manual/
+#
+AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "/usr/share/httpd/manual$1"
+
+<Directory "/usr/share/httpd/manual">
+ Options Indexes
+ AllowOverride None
+ Require all granted
+</Directory>
diff --git a/ssl.conf b/ssl.conf
new file mode 100644
index 0000000..5791eaf
--- /dev/null
+++ b/ssl.conf
@@ -0,0 +1,218 @@
+#
+# When we also provide SSL we have to listen to the
+# the HTTPS port in addition.
+#
+Listen 443 https
+
+##
+## SSL Global Context
+##
+## All SSL configuration in this context applies both to
+## the main server and all SSL-enabled virtual hosts.
+##
+
+# 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 exec:/usr/libexec/httpd-ssl-pass-dialog
+
+# Inter-Process Session Cache:
+# Configure the SSL Session Cache: First the mechanism
+# to use and second the expiring timeout (in seconds).
+#SSLSessionCache dc:UNIX:/var/cache/mod_ssl/distcache
+SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
+SSLSessionCacheTimeout 300
+
+# 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 file:/dev/urandom 256
+SSLRandomSeed connect builtin
+#SSLRandomSeed startup file:/dev/random 512
+#SSLRandomSeed connect file:/dev/random 512
+#SSLRandomSeed connect file:/dev/urandom 512
+
+#
+# Use "SSLCryptoDevice" to enable any supported hardware
+# accelerators. Use "openssl engine -v" to list supported
+# engine names. NOTE: If you enable an accelerator and the
+# server does not start, consult the error logs and ensure
+# your accelerator is functioning properly.
+#
+SSLCryptoDevice builtin
+#SSLCryptoDevice ubsec
+
+##
+## SSL Virtual Host Context
+##
+
+<VirtualHost _default_:443>
+
+# General setup for the virtual host, inherited from global configuration
+#DocumentRoot "/var/www/html"
+#ServerName www.example.com:443
+
+# Use separate log files for the SSL virtual host; note that LogLevel
+# is not inherited from httpd.conf.
+ErrorLog logs/ssl_error_log
+TransferLog logs/ssl_access_log
+LogLevel warn
+
+# SSL Engine Switch:
+# Enable/Disable SSL for this virtual host.
+SSLEngine on
+
+# SSL Protocol support:
+# List the enable protocol levels with which clients will be able to
+# connect. Disable SSLv2 access by default:
+SSLProtocol all -SSLv2
+
+# SSL Cipher Suite:
+# List the ciphers that the client is permitted to negotiate.
+# See the mod_ssl documentation for a complete list.
+SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
+
+# Speed-optimized SSL Cipher configuration:
+# If speed is your main concern (on busy HTTPS servers e.g.),
+# you might want to force clients to specific, performance
+# optimized ciphers. In this case, prepend those ciphers
+# to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
+# Caveat: by giving precedence to RC4-SHA and AES128-SHA
+# (as in the example below), most connections will no longer
+# have perfect forward secrecy - if the server's key is
+# compromised, captures of past or future traffic must be
+# considered compromised, too.
+#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
+#SSLHonorCipherOrder on
+
+# 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. A new
+# certificate can be generated using the genkey(1) command.
+SSLCertificateFile /etc/pki/tls/certs/localhost.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/pki/tls/private/localhost.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/pki/tls/certs/server-chain.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)
+#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
+
+# 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 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 +StrictRequire
+<Files ~ "\.(cgi|shtml|phtml|php3?)$">
+ SSLOptions +StdEnvVars
+</Files>
+<Directory "/var/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.
+BrowserMatch "MSIE [2-5]" \
+ 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 logs/ssl_request_log \
+ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
+
+</VirtualHost>
+
diff --git a/userdir.conf b/userdir.conf
new file mode 100644
index 0000000..b5d7a49
--- /dev/null
+++ b/userdir.conf
@@ -0,0 +1,36 @@
+#
+# UserDir: The name of the directory that is appended onto a user's home
+# directory if a ~user request is received.
+#
+# The path to the end user account 'public_html' directory must be
+# accessible to the webserver userid. This usually means that ~userid
+# must have permissions of 711, ~userid/public_html must have permissions
+# of 755, and documents contained therein must be world-readable.
+# Otherwise, the client will only receive a "403 Forbidden" message.
+#
+<IfModule mod_userdir.c>
+ #
+ # UserDir is disabled by default since it can confirm the presence
+ # of a username on the system (depending on home directory
+ # permissions).
+ #
+ UserDir disabled
+
+ #
+ # To enable requests to /~user/ to serve the user's public_html
+ # directory, remove the "UserDir disabled" line above, and uncomment
+ # the following line instead:
+ #
+ #UserDir public_html
+</IfModule>
+
+#
+# Control access to UserDir directories. The following is an example
+# for a site where these directories are restricted to read-only.
+#
+<Directory "/home/*/public_html">
+ AllowOverride FileInfo AuthConfig Limit Indexes
+ Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
+ Require method GET POST OPTIONS
+</Directory>
+
diff --git a/welcome.conf b/welcome.conf
new file mode 100644
index 0000000..5d1e452
--- /dev/null
+++ b/welcome.conf
@@ -0,0 +1,18 @@
+#
+# This configuration file enables the default "Welcome" page if there
+# is no default index page present for the root URL. To disable the
+# Welcome page, comment out all the lines below.
+#
+# NOTE: if this file is removed, it will be restored on upgrades.
+#
+<LocationMatch "^/+$">
+ Options -Indexes
+ ErrorDocument 403 /.noindex.html
+</LocationMatch>
+
+<Directory /usr/share/httpd/noindex>
+ AllowOverride None
+ Require all granted
+</Directory>
+
+Alias /.noindex.html /usr/share/httpd/noindex/index.html