diff options
author | Martina Pietruschka | 2015-06-08 22:25:47 +0000 |
---|---|---|
committer | Martina Pietruschka | 2015-06-08 22:25:47 +0000 |
commit | 1b7a6d1c62b7c1ac40f27fbb2f36d9d24fb09059 (patch) | |
tree | e89162de9770c6d4e07b7ea807594a5d5f02c2b1 | |
download | aur-1b7a6d1c62b7c1ac40f27fbb2f36d9d24fb09059.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 38 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | apache.example.conf | 8 | ||||
-rw-r--r-- | htaccess | 4 | ||||
-rw-r--r-- | install | 6 | ||||
-rw-r--r-- | nginx-location.conf | 32 | ||||
-rw-r--r-- | nginx-ssl.example.conf | 56 | ||||
-rw-r--r-- | php-fpm.example.conf | 3 | ||||
-rw-r--r-- | z-push.conf | 35 | ||||
-rw-r--r-- | z-push.ini | 10 |
10 files changed, 255 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b3c55c67f039 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,38 @@ +# Generated by makepkg 4.2.1 +# Tue May 19 22:01:25 UTC 2015 +pkgbase = z-push + pkgdesc = open-source implementation of the ActiveSync protocol + pkgver = 2.2.1 + pkgrel = 3 + url = http://z-push.sf.net/ + install = install + arch = any + license = AGPL3 + depends = php + optdepends = php-fpm + optdepends = nginx + optdepends = apache + optdepends = zarafa-server + options = !strip + backup = etc/webapps/z-push/nginx-location.conf + backup = etc/php/conf.d/z-push.ini + backup = etc/php/fpm.d/z-push.conf + source = z-push-2.2.1-1939.tar.gz::http://download.z-push.org/final/2.2/z-push-2.2.1-1939.tar.gz + source = apache.example.conf + source = htaccess + source = z-push.ini + source = z-push.conf + source = nginx-location.conf + source = nginx-ssl.example.conf + source = php-fpm.example.conf + md5sums = 6c0e968c1ca07ec65824193d01c016b9 + md5sums = 32a459bd61135b6c5e99e82e3a6b0007 + md5sums = 1091aa1ba272ef05bf628f73b05c527a + md5sums = 6e87a175d15fce77264ae87ed016b223 + md5sums = b61c194ee4e3e3bf8bfa6a72e6f38019 + md5sums = 9637d4164f85cb3fb9a886654645a46c + md5sums = 73451bc5c35072b22b0b2925c5920978 + md5sums = 7adcf5e023718421a5e8e07e5e9a2480 + +pkgname = z-push + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..827f195bb07a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: MartiMcFly martimcfly@autorisation.de +# Contributor: C Anthony Risinger +# Contributer: Jörg Thalheim <joerg@higgsboson.tk> + +pkgname=z-push +pkgver=2.2.1 +_pkgrev=1939 +pkgrel=3 +pkgdesc="open-source implementation of the ActiveSync protocol" +arch=('any') +url="http://z-push.sf.net/" +license=('AGPL3') +depends=('php') +optdepends=('php-fpm' + 'nginx' + 'apache' + 'zarafa-server') +install=('install') +backup=('etc/webapps/z-push/nginx-location.conf' + 'etc/php/conf.d/z-push.ini' + 'etc/php/fpm.d/z-push.conf') +options=('!strip') +source=("${pkgname}-${pkgver}-${_pkgrev}.tar.gz::http://download.z-push.org/final/2.2/${pkgname}-${pkgver}-${_pkgrev}.tar.gz" + "apache.example.conf" + "htaccess" + "z-push.ini" + "z-push.conf" + "nginx-location.conf" + "nginx-ssl.example.conf" + "php-fpm.example.conf") + +md5sums=('6c0e968c1ca07ec65824193d01c016b9' + '32a459bd61135b6c5e99e82e3a6b0007' + '1091aa1ba272ef05bf628f73b05c527a' + '6e87a175d15fce77264ae87ed016b223' + 'b61c194ee4e3e3bf8bfa6a72e6f38019' + '9637d4164f85cb3fb9a886654645a46c' + '73451bc5c35072b22b0b2925c5920978' + '7adcf5e023718421a5e8e07e5e9a2480') + +package() { + # according to https://wiki.archlinux.org/index.php/Web_application_package_guidelines + mkdir -p ${pkgdir}/usr/share/webapps/z-push + cp -r ${srcdir}/${pkgname}-${pkgver}-${_pkgrev}/* ${pkgdir}/usr/share/webapps/z-push/ + cp ${srcdir}/htaccess ${pkgdir}/usr/share/webapps/z-push/.htaccess + rm ${pkgdir}/usr/share/webapps/z-push/config.php + + mkdir -p ${pkgdir}/etc/webapps/z-push + cp ${srcdir}/apache.example.conf ${pkgdir}/etc/webapps/z-push/ + cp ${srcdir}/php-fpm.example.conf ${pkgdir}/etc/webapps/z-push/ + cp ${srcdir}/nginx-ssl.example.conf ${pkgdir}/etc/webapps/z-push/ + cp ${srcdir}/nginx-location.conf ${pkgdir}/etc/webapps/z-push/ + cp ${srcdir}/${pkgname}-${pkgver}-${_pkgrev}/config.php ${pkgdir}/etc/webapps/z-push/config.example.php + ln -s /etc/webapps/z-push/config.php ${pkgdir}/usr/share/webapps/z-push/config.php + + mkdir -p ${pkgdir}/etc/php/conf.d + cp ${srcdir}/z-push.ini ${pkgdir}/etc/php/conf.d + + mkdir -p ${pkgdir}/etc/php/fpm.d + cp ${srcdir}/z-push.conf ${pkgdir}/etc/php/fpm.d + + mkdir -p ${pkgdir}/var/{lib,log}/z-push +} diff --git a/apache.example.conf b/apache.example.conf new file mode 100644 index 000000000000..3815e9844960 --- /dev/null +++ b/apache.example.conf @@ -0,0 +1,8 @@ +Alias /Microsoft-Server-ActiveSync /usr/share/webapps/z-push/index.php + +<Directory /usr/share/webapps/z-push/> + DirectoryIndex index.php + AllowOverride Options + + Require all granted +</Directory> diff --git a/htaccess b/htaccess new file mode 100644 index 000000000000..5968acaa485f --- /dev/null +++ b/htaccess @@ -0,0 +1,4 @@ +php_flag magic_quotes_gpc off +php_flag register_globals off +php_flag magic_quotes_runtime off +php_flag short_open_tag on diff --git a/install b/install new file mode 100644 index 000000000000..161f5e93dd11 --- /dev/null +++ b/install @@ -0,0 +1,6 @@ +post_install() { + cp -n /etc/webapps/z-push/config.example.php /etc/webapps/z-push/config.php + chown -R http:http /var/log/z-push + chown -R http:http /var/lib/z-push +} + diff --git a/nginx-location.conf b/nginx-location.conf new file mode 100644 index 000000000000..2ea6a503598c --- /dev/null +++ b/nginx-location.conf @@ -0,0 +1,32 @@ + + ### + ## In order to run this component you need to define a server-context in. + ## /etc/nginx/nginx.conf: + ## + ## http { + ## server { + ## listen 80; + ## include ${PATH_TO_THIS_LOCATION_FILE}; + ## } + ## } + ## + ## Or include this file in your existing server-context. + ## + location /Microsoft-Server-ActiveSync { + root /usr/share/webapps/z-push; + + ## [WARNING] The following header states that the browser should only communicate + ## with your server over a secure connection for the next 24 months. + add_header Strict-Transport-Security max-age=63072000; + add_header X-Frame-Options DENY; + add_header X-Content-Type-Options nosniff; + + fastcgi_connect_timeout 65; + fastcgi_send_timeout 6000; + fastcgi_read_timeout 6000; + + fastcgi_pass unix:/run/php-fpm/z-push.sock; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root/index.php; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + } diff --git a/nginx-ssl.example.conf b/nginx-ssl.example.conf new file mode 100644 index 000000000000..a37c2447634a --- /dev/null +++ b/nginx-ssl.example.conf @@ -0,0 +1,56 @@ + + server { + # server_name YOUR_SERVER_FQDN; ## uncomment replace this with something like www.example.com + listen 443; + + server_tokens off; ## Don't show the nginx version number, a security best practice + root /var/lib/nginx/http + + ## Strong SSL Security + ## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html & https://cipherli.st/ + ## + ## Generate a strong SSL-Certificate and DHE parameter: + ## openssl genrsa -out /etc/ssl/private/zarafa.key 4096 + ## openssl req -new -sha512 -key /etc/ssl/private/zarafa.key -out /tmp/zarafa.csr + ## openssl x509 -req -days 3650 -in /tmp/zarafa.csr -signkey /etc/ssl/private/zarafa.key -out /etc/ssl/private/zarafa.crt + ## openssl dhparam -out /etc/ssl/private/zarafa.dh 4096 + ## chmod go-rwx /etc/ssl/private/zarafa.*; + ## chmod u+rw /etc/ssl/private/zarafa.* + ## chown root:root /etc/ssl/private/zarafa.* + ## + ssl on; + ssl_certificate_key /etc/ssl/private/zarafa.key; + ssl_certificate /etc/ssl/private/zarafa.crt; + ssl_dhparam /etc/ssl/private/zarafa.dh; + + ## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html + ## The recommended cipher suite for backwards compatibility (IE6/WinXP): + ssl_ciphers 'AES256+EECDH:AES256+EDH:!aNULL'; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:50m; + ssl_session_timeout 5m; + + ## [Optional] If your certficate has OCSP, enable OCSP stapling to reduce the overhead and latency of running SSL. + ## Replace with your ssl_trusted_certificate. For more info see: + ## - https://medium.com/devops-programming/4445f4862461 + ## - https://www.ruby-forum.com/topic/4419319 + ## - https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx + ## - https://raymii.org/s/tutorials/OCSP_Stapling_on_nginx.html + ## - http://freiburg79.de/ocsp-stapling-mit-nginx/ + # ssl_stapling on; + # ssl_stapling_verify on; + # ssl_stapling_file /etc/ssl/private/de-autorisation-m.ocsp; + # resolver 208.67.222.222 208.67.222.220 valid=300s; # Can change to your DNS resolver if desired + # resolver_timeout 5s; + + # HIDDEN FILES AND FOLDERS + rewrite ^(.*)\/\.(.*)$ @404 break; + + location = @404 { + return 404; + } + + include ${PATH_TO_ATTACHED_LOCATION_FILE}; + include ${PATH_TO_ANOTHER_LOCATION_FILE}; + }
\ No newline at end of file diff --git a/php-fpm.example.conf b/php-fpm.example.conf new file mode 100644 index 000000000000..9c70c26482fd --- /dev/null +++ b/php-fpm.example.conf @@ -0,0 +1,3 @@ +[global] +pid = /run/php-fpm/php-fpm.pid +include = /etc/php/fpm.d/*.conf
\ No newline at end of file diff --git a/z-push.conf b/z-push.conf new file mode 100644 index 000000000000..ea8006c64b5a --- /dev/null +++ b/z-push.conf @@ -0,0 +1,35 @@ +[z-push] +listen = /run/php-fpm/z-push.sock +listen.owner = http +listen.group = http +listen.mode = 0666 + + +user = http +group = http + +# z-push for 5 users +pm = ondemand +pm.max_children = 15 +pm.max_requests = 500 + +env[HOSTNAME] = $HOSTNAME +env[PATH] = /usr/local/bin:/usr/bin:/bin +env[TMP] = /tmp +env[TMPDIR] = /tmp +env[TEMP] = /tmp +env[HOME] = /home + +php_admin_value[memory_limit] = 128M +php_admin_value[open_basedir] = ${open_basedir}:/usr/share/webapps/z-push:/etc/webapps/z-push:/var/lib/z-push:/var/log/z-push:/usr/share/php/mapi + +php_admin_value[upload_max_filesize] = 20M +php_admin_value[post_max_size] = 20M +php_admin_value[date.timezone] = Europe/Berlin + +## https://z-push.org/svn/z-push/trunk/src/INSTALL +## +php_flag[magic_quotes_gpc] = off +php_flag[register_globals] = off +php_flag[magic_quotes_runtime] = off +php_flag[short_open_tag] = on diff --git a/z-push.ini b/z-push.ini new file mode 100644 index 000000000000..3c67d3bbcd17 --- /dev/null +++ b/z-push.ini @@ -0,0 +1,10 @@ +extension=mapi.so +extension=iconv.so +extension=posix.so +extension=shmop.so +extension=soap.so +extension=sysvsem.so +extension=sysvshm.so + +; in order to use the utils this system wide is needed +open_basedir=${open_basedir}:/usr/share/webapps/z-push:/etc/webapps/z-push:/var/lib/webapps/z-push:/var/log/z-push:/usr/share/php/mapi |