From bd413dca0072b26d8f232aed1f2b9122f9d647ef Mon Sep 17 00:00:00 2001 From: gau1991 Date: Wed, 20 Aug 2014 18:39:07 +0530 Subject: [PATCH] Added Roundcbue Nginx configuration --- src/vendor/ee_ven_setup_roundcube.sh | 7 +++++++ templates/mail/webmail | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 templates/mail/webmail diff --git a/src/vendor/ee_ven_setup_roundcube.sh b/src/vendor/ee_ven_setup_roundcube.sh index f7908aae..2ea51517 100644 --- a/src/vendor/ee_ven_setup_roundcube.sh +++ b/src/vendor/ee_ven_setup_roundcube.sh @@ -25,4 +25,11 @@ function ee_ven_setup_roundcube() sed -i "s'mysql://roundcube:pass@localhost/roundcubemail'mysql://roundcube:${ee_random}@${EE_MYSQL_HOST}/roundcubemail'" /var/www/roundcubemail/htdocs/config/config.inc.php \ || ee_lib_error "Unable to setup Roundcube database details in config.inc.php file, exit status = " $? + # Setup Nginx configuration to access Webmail + cp -v /usr/share/easyengine/mail/webmail /etc/nginx/sites-available/ &>> $EE_COMMAND_LOG \ + || ee_lib_error "Unable to copy Nginx configuration for Roundcube, exit status = " $? + + ln -sf /etc/nginx/sites-available/webmail /etc/nginx/sites-enabled/ \ + || ee_lib_error "Unable to create softlink for Webmail, exit status = " $? + } diff --git a/templates/mail/webmail b/templates/mail/webmail new file mode 100644 index 00000000..fff3a464 --- /dev/null +++ b/templates/mail/webmail @@ -0,0 +1,23 @@ +# Nginx Configuration to access webmail +# Don't modify this file, EasyEngine replaces it with new version + +server { + server_name webmail.*; + + access_log /var/log/nginx/webmail.access.log; + error_log /var/log/nginx/webmail.error.log; + + root /var/www/roundcube/htdocs; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + try_files $uri =404; + include fastcgi_params; + fastcgi_pass 127.0.0.1:9000; + } + +}