aboutsummaryrefslogtreecommitdiffstats
path: root/community/roundcubemail/nginx.conf
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/roundcubemail/nginx.conf
parent1d6c1025d8d5fa9787fa3632bc7bc1fa357e62f1 (diff)
downloadaports-0bb3e90ee85c976a9f8cf31f3bace04cf3b0a003.tar.bz2
aports-0bb3e90ee85c976a9f8cf31f3bace04cf3b0a003.tar.xz
community/roundcubemail: add sample nginx config to -doc
Diffstat (limited to 'community/roundcubemail/nginx.conf')
-rw-r--r--community/roundcubemail/nginx.conf56
1 files changed, 56 insertions, 0 deletions
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;
+ }
+}