summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-11-01 21:19:00 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-11-01 21:24:15 +0000
commitb1638039e29283d0f0f1251f275f11fd904e8986 (patch)
tree2af4f0f47c355efbb29be8b59b47e53f2bb42b61 /main
parent84298caaa5b5db22f4daa640518765006eef67ce (diff)
downloadaports-b1638039e29283d0f0f1251f275f11fd904e8986.tar.bz2
aports-b1638039e29283d0f0f1251f275f11fd904e8986.tar.xz
main/apache2: fix default conf and split some mods
- New default config based on V Krishn's work. - split out lua mod as it pulls in lua package as dependency - split out proxy-html as it pulls in libxml2 - split out proxy as most ppl probably dont need it - fix webdav package Fixes #1457
Diffstat (limited to 'main')
-rw-r--r--main/apache2/APKBUILD52
-rw-r--r--main/apache2/httpd.conf129
-rw-r--r--main/apache2/lua.conf1
-rw-r--r--main/apache2/proxy-html.conf1
-rw-r--r--main/apache2/proxy.conf15
5 files changed, 144 insertions, 54 deletions
diff --git a/main/apache2/APKBUILD b/main/apache2/APKBUILD
index 988dace89..d5151f258 100644
--- a/main/apache2/APKBUILD
+++ b/main/apache2/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apache2
pkgver=2.4.3
-pkgrel=1
+pkgrel=2
pkgdesc="A high performance Unix-based HTTP server"
url="http://httpd.apache.org/"
arch="all"
@@ -12,9 +12,10 @@ pkggroups="apache"
makedepends="openssl-dev zlib-dev apr-util-dev apr-dev pcre-dev sed lua-dev
autoconf automake"
subpackages="$pkgname-dev $pkgname-doc $pkgname-utils $pkgname-ssl
- $pkgname-ldap $pkgname-webdav"
-# see http://lists.err.no/pipermail/mpm-itk/2011-August/000432.html for
-# the 03-add-mpm-to-build-system.patch
+ $pkgname-ldap $pkgname-webdav
+ $pkgname-proxy-html:proxy_html
+ $pkgname-proxy
+ $pkgname-lua:_lua"
source="http://archive.apache.org/dist/httpd/httpd-$pkgver.tar.bz2
apache2.confd
apache2.logrotate
@@ -22,6 +23,9 @@ source="http://archive.apache.org/dist/httpd/httpd-$pkgver.tar.bz2
httpd.conf
ssl.conf
ldap.conf
+ proxy-html.conf
+ proxy.conf
+ lua.conf
alpine.layout
"
_builddir="$srcdir"/httpd-$pkgver
@@ -153,19 +157,57 @@ ldap() {
webdav() {
pkgdesc="WebDAV support for the Apache HTTP Server"
depends="apache2"
+ replaces="apache2"
install -d "$subpkgdir"/usr/lib/apache2 || return 1
mv "$pkgdir"/usr/lib/apache2/mod_*dav.so \
+ "$pkgdir"/usr/lib/apache2/mod_dav_*.so \
"$subpkgdir"/usr/lib/apache2/ || return 1
install -D -m644 "$_builddir"/docs/conf/extra/httpd-dav.conf \
"$subpkgdir"/etc/apache2/conf.d/http-dav.conf || return 1
}
+proxy_html() {
+ pkgdesc="HTML and XML content filters for the Apache HTTP Server"
+ depends="apache2"
+ install -d "$subpkgdir"/usr/lib/apache2 || return 1
+ mv "$pkgdir"/usr/lib/apache2/*_proxy_html.so \
+ "$pkgdir"/usr/lib/apache2/*xml2enc*.so \
+ "$subpkgdir"/usr/lib/apache2/ || return 1
+ install -D -m644 "$srcdir"/proxy-html.conf \
+ "$subpkgdir"/etc/apache2/conf.d/proxy-html.conf || return 1
+}
+
+proxy() {
+ pkgdesc="Proxy modules for the Apache HTTP Server"
+ depends="apache2"
+ install -d "$subpkgdir"/usr/lib/apache2 || return 1
+ mv "$pkgdir"/usr/lib/apache2/*_proxy*.so \
+ "$pkgdir"/usr/lib/apache2/*_lbmethod*.so \
+ "$subpkgdir"/usr/lib/apache2/ || return 1
+ install -D -m644 "$srcdir"/proxy.conf \
+ "$subpkgdir"/etc/apache2/conf.d/proxy.conf || return 1
+}
+
+_lua() {
+ pkgdesc="Lua support for the Apache HTTP server"
+ depends="apache2"
+ install -d "$subpkgdir"/usr/lib/apache2 || return 1
+ mv "$pkgdir"/usr/lib/apache2/*_lua.so \
+ "$subpkgdir"/usr/lib/apache2/ || return 1
+ install -D -m644 "$srcdir"/lua.conf \
+ "$subpkgdir"/etc/apache2/conf.d/lua.conf || return 1
+}
+
+
md5sums="87aaf7bc7e8715f0455997bb8c6791aa httpd-2.4.3.tar.bz2
e322b5211e49511cac6e40c86af1b1da apache2.confd
75fe4138b98fcffd01b8c8c077b944f3 apache2.logrotate
7105fc70298b24bfca6dba517f7486d7 apache2.initd
-749faf0b2916d85d1240bc34f700e5d9 httpd.conf
+cceb6f5c3949326b48e0fcf196a2495d httpd.conf
5d0d024ca43571b863874ab871b2c109 ssl.conf
b70fe826486043e3953cfe21f9e6fa16 ldap.conf
+fe26a0a70f572eb256a3c6c183a62223 proxy-html.conf
+96eddccfca1ec0349f844e2460cf655b proxy.conf
+449a4aea60473ac4a16f025fca4463e3 lua.conf
c66ff5f70260d5266e6803a59b39bd7f alpine.layout"
diff --git a/main/apache2/httpd.conf b/main/apache2/httpd.conf
index 087f3fb8c..dd1258808 100644
--- a/main/apache2/httpd.conf
+++ b/main/apache2/httpd.conf
@@ -1,9 +1,9 @@
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
-# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
+# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
-# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
+# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
#
@@ -49,7 +49,7 @@ ServerTokens OS
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
-# (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
+# (available at <URL:http://httpd.apache.org/docs/2.4/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
@@ -167,36 +167,58 @@ Listen 80
# Example:
# LoadModule foo_module modules/mod_foo.so
#
-LoadModule auth_basic_module modules/mod_auth_basic.so
-LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
-LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
-LoadModule authn_dbm_module modules/mod_authn_dbm.so
-LoadModule authn_default_module modules/mod_authn_default.so
+LoadModule authn_socache_module modules/mod_authn_socache.so
+LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
+LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
-LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
-LoadModule authz_dbm_module modules/mod_authz_dbm.so
-LoadModule authz_default_module modules/mod_authz_default.so
+LoadModule authz_core_module modules/mod_authz_core.so
+LoadModule access_compat_module modules/mod_access_compat.so
+LoadModule auth_basic_module modules/mod_auth_basic.so
+LoadModule auth_form_module modules/mod_auth_form.so
+LoadModule auth_digest_module modules/mod_auth_digest.so
+LoadModule asis_module modules/mod_asis.so
+LoadModule allowmethods_module modules/mod_allowmethods.so
+LoadModule file_cache_module modules/mod_file_cache.so
+LoadModule cache_module modules/mod_cache.so
+LoadModule cache_disk_module modules/mod_cache_disk.so
+LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
+LoadModule socache_memcache_module modules/mod_socache_memcache.so
+LoadModule echo_module modules/mod_echo.so
+LoadModule buffer_module modules/mod_buffer.so
+LoadModule ratelimit_module modules/mod_ratelimit.so
+LoadModule reqtimeout_module modules/mod_reqtimeout.so
+LoadModule ext_filter_module modules/mod_ext_filter.so
+LoadModule request_module modules/mod_request.so
LoadModule include_module modules/mod_include.so
+LoadModule substitute_module modules/mod_substitute.so
+LoadModule sed_module modules/mod_sed.so
+LoadModule charset_lite_module modules/mod_charset_lite.so
+LoadModule deflate_module modules/mod_deflate.so
+LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
+LoadModule log_debug_module modules/mod_log_debug.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
-LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
-LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
-LoadModule mime_module modules/mod_mime.so
-LoadModule dav_module modules/mod_dav.so
+LoadModule version_module modules/mod_version.so
+LoadModule remoteip_module modules/mod_remoteip.so
+LoadModule session_module modules/mod_session.so
+LoadModule session_cookie_module modules/mod_session_cookie.so
+LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
+LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
-LoadModule dav_fs_module modules/mod_dav_fs.so
+LoadModule suexec_module modules/mod_suexec.so
+LoadModule cgi_module modules/mod_cgi.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
@@ -204,33 +226,44 @@ LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
-LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
-LoadModule proxy_module modules/mod_proxy.so
-LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
-LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
-LoadModule proxy_http_module modules/mod_proxy_http.so
-LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
-LoadModule proxy_connect_module modules/mod_proxy_connect.so
-LoadModule cache_module modules/mod_cache.so
-LoadModule suexec_module modules/mod_suexec.so
-LoadModule disk_cache_module modules/mod_disk_cache.so
-LoadModule cgi_module modules/mod_cgi.so
-LoadModule version_module modules/mod_version.so
+
+LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
+#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
#
# The following modules are not loaded by default:
#
-#LoadModule asis_module modules/mod_asis.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
-#LoadModule cern_meta_module modules/mod_cern_meta.so
+#LoadModule authn_dbm_module modules/mod_authn_dbm.so
+#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
+#LoadModule authz_dbd_module modules/mod_authz_dbd.so
+#LoadModule authz_dbm_module modules/mod_authz_dbm.so
#LoadModule cgid_module modules/mod_cgid.so
+#LoadModule data_module modules/mod_data.so
#LoadModule dbd_module modules/mod_dbd.so
+#LoadModule dialup_module modules/mod_dialup.so
#LoadModule dumpio_module modules/mod_dumpio.so
#LoadModule filter_module modules/mod_filter.so
-#LoadModule ident_module modules/mod_ident.so
+#LoadModule heartbeat_module modules/mod_heartbeat.so
+#LoadModule heartmonitor_module modules/mod_heartmonitor.so
+#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
+#LoadModule ldap_module modules/mod_ldap.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
+#LoadModule mpm_event_module modules/mod_mpm_event.so
+#LoadModule mpm_worker_module modules/mod_mpm_worker.so
+#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
+#LoadModule proxy_html_module modules/mod_proxy_html.so
+#LoadModule reflector_module modules/mod_reflector.so
+#LoadModule session_dbd_module modules/mod_session_dbd.so
+#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
+#LoadModule socache_dbm_module modules/mod_socache_dbm.so
+#LoadModule ssl_module modules/mod_ssl.so
#LoadModule unique_id_module modules/mod_unique_id.so
+#LoadModule watchdog_module modules/mod_watchdog.so
+#LoadModule xml2enc_module modules/mod_xml2enc.so
#
#
@@ -245,6 +278,7 @@ Include /etc/apache2/conf.d/*.conf
#
#ExtendedStatus On
+<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
@@ -259,6 +293,7 @@ Include /etc/apache2/conf.d/*.conf
#
User apache
Group apache
+</IfModule>
### Section 2: 'Main' server configuration
#
@@ -319,7 +354,10 @@ DocumentRoot "/var/www/localhost/htdocs"
#
<Directory />
Options FollowSymLinks
- AllowOverride None
+ AllowOverride none
+# Require all denied
+# Order allow,deny
+# Deny from all
</Directory>
#
@@ -343,7 +381,7 @@ DocumentRoot "/var/www/localhost/htdocs"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
-# http://httpd.apache.org/docs/2.2/mod/core.html#options
+# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
@@ -353,11 +391,12 @@ DocumentRoot "/var/www/localhost/htdocs"
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
- AllowOverride None
+ AllowOverride All
#
# Controls who can get stuff from this server.
#
+# Require all granted
Order allow,deny
Allow from all
@@ -443,17 +482,6 @@ AccessFileName .htaccess
TypesConfig /etc/apache2/mime.types
#
-# DefaultType is the default MIME type the server will use for a document
-# if it cannot otherwise determine one, such as from filename extensions.
-# If your server contains mostly text or HTML documents, "text/plain" is
-# a good value. If most of your content is binary, such as applications
-# or images, you may want to use "application/octet-stream" instead to
-# keep browsers from trying to display binary files as though they are
-# text.
-#
-DefaultType text/plain
-
-#
# 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.
@@ -478,7 +506,7 @@ HostnameLookups Off
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
-# http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
+# http://httpd.apache.org/docs/2.4/mod/core.html#enablemmap
#
#EnableMMAP off
@@ -487,7 +515,7 @@ HostnameLookups Off
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. Please see
-# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
+# http://httpd.apache.org/docs/2.4/mod/core.html#enablesendfile
#
#EnableSendfile off
@@ -570,6 +598,7 @@ Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
+# Require all granted
Order allow,deny
Allow from all
</Directory>
@@ -599,6 +628,7 @@ ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
+# Require all granted
Order allow,deny
Allow from all
</Directory>
@@ -878,6 +908,7 @@ Alias /error/ "/usr/share/apache2/error/"
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
+ #Require all granted
Order allow,deny
Allow from all
LanguagePriority en es de fr
@@ -976,7 +1007,7 @@ BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
#
# To enable a cache of proxied content, uncomment the following lines.
-# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
+# See http://httpd.apache.org/docs/2.4/mod/mod_cache.html for more details.
#
#<IfModule mod_disk_cache.c>
# CacheEnable disk /
@@ -995,7 +1026,7 @@ BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
-# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
+# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
diff --git a/main/apache2/lua.conf b/main/apache2/lua.conf
new file mode 100644
index 000000000..9e0d0db6e
--- /dev/null
+++ b/main/apache2/lua.conf
@@ -0,0 +1 @@
+LoadModule lua_module modules/mod_lua.so
diff --git a/main/apache2/proxy-html.conf b/main/apache2/proxy-html.conf
new file mode 100644
index 000000000..90cbf71e6
--- /dev/null
+++ b/main/apache2/proxy-html.conf
@@ -0,0 +1 @@
+LoadModule proxy_module modules/mod_proxy.so
diff --git a/main/apache2/proxy.conf b/main/apache2/proxy.conf
new file mode 100644
index 000000000..a44682291
--- /dev/null
+++ b/main/apache2/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