1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-26 19:27:23 +01:00

Add webmail. subdomain to access roundcube

This commit is contained in:
Victor Lap
2019-10-08 09:39:27 +02:00
committed by Victor Lap
parent 30c2c60f59
commit f7f5f4ecae
4 changed files with 51 additions and 35 deletions

View File

@@ -22,30 +22,6 @@
alias /var/lib/mailinabox/mozilla-autoconfig.xml;
}
# Roundcube Webmail configuration.
rewrite ^/mail$ /mail/ redirect;
rewrite ^/mail/$ /mail/index.php;
location /mail/ {
index index.php;
alias /usr/local/lib/roundcubemail/;
}
location ~ /mail/config/.* {
# A ~-style location is needed to give this precedence over the next block.
return 403;
}
location ~ /mail/.*\.php {
# note: ~ has precendence over a regular location block
include fastcgi_params;
fastcgi_split_path_info ^/mail(/.*)()$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/lib/roundcubemail/$fastcgi_script_name;
fastcgi_pass php-fpm;
# Outgoing mail also goes through this endpoint, so increase the maximum
# file upload limit to match the corresponding Postfix limit.
client_max_body_size 128M;
}
# Z-Push (Microsoft Exchange ActiveSync)
location /Microsoft-Server-ActiveSync {
include /etc/nginx/fastcgi_params;

22
conf/nginx-webmail.conf Normal file
View File

@@ -0,0 +1,22 @@
# Roundcube Webmail configuration.
rewrite ^$WEBMAIL_PATH$ $WEBMAIL_PATH/ redirect;
location $WEBMAIL_PATH/ {
index index.php;
alias /usr/local/lib/roundcubemail/;
}
location ~ $WEBMAIL_PATH/config/.* {
# A ~-style location is needed to give this precedence over the next block.
return 403;
}
location ~ $WEBMAIL_PATH/.*\.php {
# note: ~ has precendence over a regular location block
include fastcgi_params;
fastcgi_split_path_info ^$WEBMAIL_PATH(/.*)()$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/lib/roundcubemail/$fastcgi_script_name;
fastcgi_pass php-fpm;
# Outgoing mail also goes through this endpoint, so increase the maximum
# file upload limit to match the corresponding Postfix limit.
client_max_body_size 128M;
}