aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-27 15:02:31 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-27 15:30:37 +0200
commit0bb3e90ee85c976a9f8cf31f3bace04cf3b0a003 (patch)
treef66de9297819b75eaf1b28393aa8ba281120cdf1 /community
parent1d6c1025d8d5fa9787fa3632bc7bc1fa357e62f1 (diff)
downloadaports-0bb3e90ee85c976a9f8cf31f3bace04cf3b0a003.tar.bz2
aports-0bb3e90ee85c976a9f8cf31f3bace04cf3b0a003.tar.xz
community/roundcubemail: add sample nginx config to -doc
Diffstat (limited to 'community')
-rw-r--r--community/roundcubemail/APKBUILD9
-rw-r--r--community/roundcubemail/nginx.conf56
2 files changed, 63 insertions, 2 deletions
diff --git a/community/roundcubemail/APKBUILD b/community/roundcubemail/APKBUILD
index 618976dc37..162268ab32 100644
--- a/community/roundcubemail/APKBUILD
+++ b/community/roundcubemail/APKBUILD
@@ -49,6 +49,7 @@ source="https://github.com/roundcube/$pkgname/releases/download/$pkgver/$pkgname
config-disable-remote-spellcheck.patch
config.inc.php
fpm-pool.conf
+ nginx.conf
$pkgname.confd
$pkgname.logrotate
$pkgname.daily
@@ -107,6 +108,7 @@ prepare() {
}
package() {
+ local docdir="$pkgdir/usr/share/doc/roundcube"
local config plugname
mkdir -p "$pkgdir/$_destdir"
@@ -124,11 +126,13 @@ package() {
"$srcdir"/config.inc.php ./etc/roundcube/
local file; for file in CHANGELOG INSTALL README.md UPGRADING; do
- _mv ./$_destdir/$file ./usr/share/doc/roundcube/
+ _mv ./$_destdir/$file "$docdir"/
done
- _mv ./etc/roundcube/config.inc.php.sample ./usr/share/doc/roundcube/
+ _mv ./etc/roundcube/config.inc.php.sample "$docdir"/
_mv ./$_destdir/LICENSE ./usr/share/licenses/roundcube/
+ install -m 644 -D "$srcdir"/nginx.conf "$docdir"/
+
install -m 755 -D "$srcdir"/$pkgname.daily ./etc/periodic/daily/$pkgname
install -m 644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname
@@ -211,6 +215,7 @@ d205ba8442870b26f93fb287e7fe2bd1a452ea534823869b7ef299e2dca52d64c8a3fdc9a44bd3bc
e46cdded33114ee7dae671d936cc41551168df29778dbf18f848a4f0eb0738a54c0751a5689716ba126ac256f2a50284afdcde542a42827003d6ba89af94f064 config-disable-remote-spellcheck.patch
1ed41e25b5045849a35eb0cb89b6779378773edcc6395b7390d9d919c956aaa487a4cc0dfa41b250129ae40444b93a3c20738101f784f17a25f7aba1d95de047 config.inc.php
c88d609e94c212215a24f54d2a2cb800d4a382b1044e0c875416bdda6a4e6c0cb896675918e8d24f3ed9e1b677d526d61f3ee1564cb870f674dac687696e8ba4 fpm-pool.conf
+0825096ee7e401c5c1687fe784bc859ca30afa754bc1f49ea56b9156fbd05dd5018e68491247f5db484e644e6f67da3ebf5ee2d2324da0e9f031fdde76517f5b nginx.conf
acaa76bfbba6117172a02ad11e39f9b55838895104e75180b057f647156c04fd2e44ac695a333f2332691d19bac5ef8afaca1f89ad409800b19f78afbb40aecb roundcubemail.confd
2e923d556d46bd7dc9360c3190fa1c5864bd0385fadaf73dacee5780cdad94ce09bc8462ccc05c3ca70bc7890aa1f1b3314a3cc831eab9d5b06c5a463483ccf7 roundcubemail.logrotate
1eca0dba4ad2bab2d2e849a13fb8752ef6a7f3fd19522d5a32600923d575983dcf873a13a338ddfc100e6d1a50151fd717b926f3a33903920398d69c9c495564 roundcubemail.daily"
diff --git a/community/roundcubemail/nginx.conf b/community/roundcubemail/nginx.conf
new file mode 100644
index 0000000000..248d8d51fc
--- /dev/null
+++ b/community/roundcubemail/nginx.conf
@@ -0,0 +1,56 @@
+# Sample nginx config for Roundcube.
+
+server {
+ listen 443 ssl;
+ listen [::]:443 ssl;
+ server_name mail.example.org;
+
+ access_log /var/log/nginx/mail.access.log main;
+ error_log /var/log/nginx/mail.error.log warn;
+
+ #ssl_certificate /etc/ssl/acme/mail.example.org/fullchain.pem;
+ #ssl_certificate_key /etc/ssl/acme/mail.example.org/privkey.pem;
+
+ # Set max upload size. Keep in sync with memory_limit, post_max_size,
+ # and upload_max_filesize in /etc/php7/php-fpm.d/roundcube.conf.
+ client_max_body_size 32M;
+
+ root /usr/share/webapps/roundcube;
+ index index.php index.html;
+
+ # Enable HSTS Policy
+ #add_header Strict-Transport-Security "max-age=315360000";
+
+ location ~ ^/(bin|SQL)/ {
+ deny all;
+ }
+
+ location ~ [^/]\.php(/|$) {
+ fastcgi_split_path_info ^(.+\.php)(.*)$;
+
+ if (!-f $document_root$fastcgi_script_name) {
+ return 404;
+ }
+ fastcgi_pass unix:/run/roundcube/fastcgi.sock;
+ fastcgi_keep_conn on;
+ fastcgi_index index.php;
+
+ include fastcgi.conf;
+ }
+
+ # Allow to cache static assets.
+ location ~ ^/(plugins|skins|program)/ {
+ add_header Cache-Control "public, max-age=2592000";
+ }
+}
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name mail.example.org;
+
+ # Redirect to https://.
+ location / {
+ rewrite ^ https://$server_name$request_uri? permanent;
+ }
+}