aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartłomiej Piotrowski <b@bpiotrowski.pl>2013-05-12 16:04:03 +0200
committerBartłomiej Piotrowski <b@bpiotrowski.pl>2013-05-12 16:04:03 +0200
commit4bdb5fec6cfda10b887fbe051fe8b6b1d15c0d94 (patch)
tree1a5a43153939c9f26176875e86edaecb11a0b422
parent043cc5f234f5ca907436031e5dabb869bac01bea (diff)
downloadaports-4bdb5fec6cfda10b887fbe051fe8b6b1d15c0d94.tar.bz2
aports-4bdb5fec6cfda10b887fbe051fe8b6b1d15c0d94.tar.xz
testing/hiawatha: new aport
-rw-r--r--testing/hiawatha/APKBUILD59
-rw-r--r--testing/hiawatha/hiawatha.conf.sample114
-rw-r--r--testing/hiawatha/hiawatha.initd22
3 files changed, 195 insertions, 0 deletions
diff --git a/testing/hiawatha/APKBUILD b/testing/hiawatha/APKBUILD
new file mode 100644
index 0000000000..f7101313c2
--- /dev/null
+++ b/testing/hiawatha/APKBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Kurt Marasco <celilo at lavabit dot com>
+# Contributor: Pascal Ernster <aur at hardfalcon dot net>
+
+pkgname=hiawatha
+pkgver=9.1
+pkgrel=0
+pkgdesc='Secure and advanced webserver'
+url='https://www.hiawatha-webserver.org/'
+arch=all
+license='GPL'
+subpackages="$pkgname-doc"
+makedepends="cmake libxml2-dev libxslt-dev"
+source="https://hiawatha-webserver.org/files/$pkgname-$pkgver.tar.gz
+ hiawatha.initd
+ hiawatha.conf.sample"
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_BINDIR=/usr/bin \
+ -DCMAKE_INSTALL_SBINDIR=/usr/sbin \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc/hiawatha \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DCMAKE_INSTALL_MANDIR=/usr/share/man \
+ -DCONFIG_DIR=/etc/hiawatha \
+ -DLOG_DIR=/var/log/hiawatha \
+ -DPID_DIR=/var/run \
+ -DENABLE_SSL=ON \
+ -DWEBROOT_DIR=/var/www/hiawatha \
+ -DWORK_DIR=/var/lib/hiawatha || return 1
+
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir/" install || return 1
+
+ sed -i 's|#ServerId = www-data|ServerId = http|' \
+ "$pkgdir"/etc/hiawatha/hiawatha.conf || return 1
+ sed -i 's|www-data|http|g' logrotate.d/hiawatha || return 1
+ install -Dm644 logrotate.d/hiawatha \
+ "$pkgdir"/etc/logrotate.d/hiawatha || return 1
+ install -Dm755 "$srcdir"/hiawatha.initd \
+ "$pkgdir"/etc/init.d/hiawatha || return 1
+ install -Dm644 "$srcdir"/hiawatha.conf.sample \
+ "$pkgdir"/usr/share/doc/hiawatha/hiawatha.conf.sample || return 1
+}
+
+md5sums="833ffc295310cb30694e2b6a2c7ffc9c hiawatha-9.1.tar.gz
+3bf112b794aa10debb93b5d892dfa425 hiawatha.initd
+fb24fcbfa820a5b85f6c4c8a520a6920 hiawatha.conf.sample"
+sha256sums="699958c178757be0a5074093c15a136cd4387403e60911d29520d362f345ab48 hiawatha-9.1.tar.gz
+c229c23712d71cf830a46f152f78a1aa726cf7c7cf9129ef7acfefb73483ae4c hiawatha.initd
+4671d2586cbe3cd6497b16ff422c6143cdab40641ef3c9c4988c478351a8f5e7 hiawatha.conf.sample"
+sha512sums="ff369bb9736d5cdf162da93888c61e4c880db0ba5ee2d56a5368cb4b8212f50dc09f0a57c664b824eec7c38c26b088db8d1e484a2a47e5f06246fe4442c652c0 hiawatha-9.1.tar.gz
+412ba77b765015dccf6804d0ef06c55590b7dbec0bf3beb18652e05ae0efc364061bb8892e9727d2a7ac5df93656b62bcb89448dfa4272ae6ae26c633523b17a hiawatha.initd
+b2aad6d02e03a3e25dc6dc30deab4637a7de5448255b6b707363e8c71ae1029e669bacdb6b88889ec1aa804fe717560e872dc44d049127af9aa155a8895c8a60 hiawatha.conf.sample"
diff --git a/testing/hiawatha/hiawatha.conf.sample b/testing/hiawatha/hiawatha.conf.sample
new file mode 100644
index 0000000000..1c1d624503
--- /dev/null
+++ b/testing/hiawatha/hiawatha.conf.sample
@@ -0,0 +1,114 @@
+# Hiawatha main configuration file
+# This is a basic sample configuration file that sets up a:
+# 1) Default web site at /srv/http/hiawatha (Note: fast CGI is not active on default site)
+# 2) Virtual host for phpmyadmin at /srv/http/phpMyAdmin
+# note: you must install phpmyadmin, mysql, php-mcrypt, and php-cgi separately. Be sure that extensions
+# mcrypt.so and mysql.so are enabled in your php.ini.
+# Also add phpmyadmin to your hosts file
+# 3) FastCGI server
+
+
+# GENERAL SETTINGS
+ServerId = http
+ConnectionsTotal = 150
+ConnectionsPerIP = 10
+SystemLogfile = /var/log/hiawatha/system.log
+GarbageLogfile = /var/log/hiawatha/garbage.log
+
+
+# BINDING SETTINGS
+# A binding is where a client can connect to.
+#
+Binding {
+ Port = 80
+}
+
+
+
+### The following fast CGI daemons require php-fpm using a UNIX socket and TCP port, respectively.
+# ACTIVATE a FastCGI server for php (using UNIX socket)
+FastCGIserver {
+ FastCGIid = PHP5
+ ConnectTo = /run/php-fpm/php-fpm.sock
+ Extension = php
+ SessionTimeout = 30
+}
+
+# ACTIVATE a FastCGI server for php (using IP-address and TCP port)
+#FastCGIserver {
+# FastCGIid = PHP5
+# ConnectTo = 127.0.0.1:9000
+# Extension = php
+# SessionTimeout = 30
+#}
+
+
+# DEFAULT WEBSITE
+# It is wise to use your IP address as the hostname of the default website
+# and give it a blank webpage. By doing so, automated webscanners won't find
+# your possible vulnerable website.
+#
+Hostname = 127.0.0.1
+WebsiteRoot = /srv/http/hiawatha
+StartFile = index.html
+AccessLogfile = /var/log/hiawatha/access.log
+ErrorLogfile = /var/log/hiawatha/error.log
+#ErrorHandler = 404:/error.cgi
+UseXSLT = yes
+
+
+# VIRTUAL HOSTS
+VirtualHost {
+
+ # If you set WebsiteRoot to /usr/share/webapps/phpMyAdmin you don't need followsymlinks
+ # I symlinked the phpMyAdmin folder to '/srv/http/phpMyAdmin' so that I can easily remember where it's located but
+ # still set 'WebsiteRoot' to the real source directory. You could point WebsiteRoot to the
+ # symlinked directory, but you will have to set 'FollowSymlinks = yes' for that to function properly
+
+ #FollowSymlinks = yes
+ #WebsiteRoot = /srv/http/phpMyAdmin
+ WebsiteRoot = /usr/share/webapps/phpMyAdmin
+ Hostname = phpmyadmin
+ AccessLogfile = /var/log/hiawatha/phpmyadmin/access.log
+ ErrorLogfile = /var/log/hiawatha/phpmyadmin/error.log
+ StartFile = index.php
+ UseFastCGI = PHP5
+
+}
+
+# Add some more
+
+#VirtualHost {
+# Hostname = www.my-domain.com
+# WebsiteRoot = /svr/http/my-domain/public
+# StartFile = index.php
+# AccessLogfile = /svr/http/my-domain/log/access.log
+# ErrorLogfile = /svr/http/my-domain/log/error.log
+# TimeForCGI = 5
+# UseFastCGI = PHP5
+# UseToolkit = banshee
+#}
+
+
+#Additional settings for monitoring
+
+UrlToolkit {
+ ToolkitID = banshee
+ RequestURI isfile Return
+ Match ^/(css|files|images|js)/ Return
+ Match ^/(favicon.ico|robots.txt|sitemap.xml)$ Return
+ Match .*\?(.*) Rewrite /index.php?$1
+ Match .* Rewrite /index.php
+}
+
+VirtualHost {
+ Hostname = monitor.domain.com
+ WebsiteRoot = /svr/http/monitor/public
+ AccessLogfile = /svr/http/monitor/logfiles/access.log
+ ErrorLogfile = /svr/http/monitor/logfiles/error.log
+ StartFile = index.php
+# ExecuteCGI = yes
+ UseFastCGI = PHP5 # Use if you use PHP as a FastCGI daemon
+ TimeForCGI = 15
+ UseToolkit = banshee
+}
diff --git a/testing/hiawatha/hiawatha.initd b/testing/hiawatha/hiawatha.initd
new file mode 100644
index 0000000000..9c04296a37
--- /dev/null
+++ b/testing/hiawatha/hiawatha.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec "/usr/sbin/hiawatha" \
+ --pidfile "/var/run/hiawatha.pid"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec "/usr/sbin/hiawatha" \
+ --pidfile "/var/run/hiawatha.pid"
+ eend $?
+}