Browse Source

Bring back /webmail alias configuration.

Raphael Schneeberger 6 years ago
parent
commit
5f70cdb460

+ 15 - 0
install/deb/nginx/webmail.inc

@@ -0,0 +1,15 @@
+location /webmail {
+    alias /var/lib/roundcube/;
+
+    location ~ /(config|temp|logs) {
+        return 404;
+    }
+
+    location ~ ^/webmail/(.*\.php)$ {
+        alias /var/lib/roundcube/$1;
+        fastcgi_pass 127.0.0.1:9000;
+        fastcgi_index index.php;
+        include fastcgi_params;
+        fastcgi_param SCRIPT_FILENAME $request_filename;
+    }
+}

+ 40 - 0
install/deb/roundcube/apache.conf

@@ -0,0 +1,40 @@
+Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
+Alias /roundcube /var/lib/roundcube
+Alias /webmail /var/lib/roundcube
+
+# Access to tinymce files
+<Directory "/usr/share/tinymce/www/">
+      Options Indexes MultiViews FollowSymLinks
+      AllowOverride None
+      Order allow,deny
+      allow from all
+</Directory>
+
+<Directory /var/lib/roundcube/>
+  Options +FollowSymLinks
+  # This is needed to parse /var/lib/roundcube/.htaccess. See its
+  # content before setting AllowOverride to None.
+  AllowOverride All
+  order allow,deny
+  allow from all
+</Directory>
+
+# Protecting basic directories:
+<Directory /var/lib/roundcube/config>
+        Options -FollowSymLinks
+        AllowOverride None
+</Directory>
+
+<Directory /var/lib/roundcube/temp>
+        Options -FollowSymLinks
+        AllowOverride None
+	Order allow,deny
+	Deny from all
+</Directory>
+
+<Directory /var/lib/roundcube/logs>
+        Options -FollowSymLinks
+        AllowOverride None
+	Order allow,deny
+	Deny from all
+</Directory>

+ 1 - 0
install/hst-install-debian.sh

@@ -1092,6 +1092,7 @@ if [ "$nginx" = 'yes' ]; then
     cp -f $hestiacp/nginx/status.conf /etc/nginx/conf.d/
     cp -f $hestiacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
     cp -f $hestiacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
+    cp -f $hestiacp/nginx/webmail.inc /etc/nginx/conf.d/
     cp -f $hestiacp/logrotate/nginx /etc/logrotate.d/
     mkdir -p /etc/nginx/conf.d/domains
     mkdir -p /var/log/nginx/domains

+ 1 - 0
install/hst-install-ubuntu.sh

@@ -1060,6 +1060,7 @@ if [ "$nginx" = 'yes' ]; then
     cp -f $hestiacp/nginx/status.conf /etc/nginx/conf.d/
     cp -f $hestiacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
     cp -f $hestiacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
+    cp -f $hestiacp/nginx/webmail.inc /etc/nginx/conf.d/
     cp -f $hestiacp/logrotate/nginx /etc/logrotate.d/
     mkdir -p /etc/nginx/conf.d/domains
     mkdir -p /var/log/nginx/domains

+ 0 - 14
install/upgrade/0.10.0-190430.sh

@@ -234,20 +234,6 @@ if [ -z "$IMAP_SYSTEM" ]; then
     fi
 fi
 
-# Remove global webmail configuration files in favor of per-domain vhosts
-if [ -f /etc/apache2/conf.d/roundcube.conf ]; then
-    echo "(*) Removing global webmail configuration files for Apache..."
-    mv /etc/apache2/conf.d/roundcube.conf $HESTIA_BACKUP/conf/
-fi
-if [ -f /etc/nginx/conf.d/webmail.inc ]; then
-    echo "(*) Removing global webmail configuration files for Nginx..."
-    mv /etc/nginx/conf.d/webmail.inc $HESTIA_BACKUP/conf/
-fi
-if [ -f /etc/nginx/conf.d/webmail.conf ]; then
-    echo "(*) Removing global webmail configuration files for Nginx..."
-    mv /etc/nginx/conf.d/webmail.conf $HESTIA_BACKUP/conf/
-fi
-
 # Remove Webalizer and set AWStats as default
 echo "(*) Removing Webalizer and setting AWStats as default web statistics backend..."
 apt purge webalizer -y > /dev/null 2>&1