From b0628ef3642a881d5e3780127591aa9c0c6c5860 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Tue, 26 Aug 2014 14:26:51 +0530 Subject: [PATCH] Created ViMbAdmin Nginx rules --- src/vendor/ee_ven_setup_vimbadmin.sh | 8 -------- templates/mail/vma | 23 ----------------------- templates/nginx/22222 | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 31 deletions(-) delete mode 100644 templates/mail/vma diff --git a/src/vendor/ee_ven_setup_vimbadmin.sh b/src/vendor/ee_ven_setup_vimbadmin.sh index d5df5091..eb419282 100644 --- a/src/vendor/ee_ven_setup_vimbadmin.sh +++ b/src/vendor/ee_ven_setup_vimbadmin.sh @@ -53,12 +53,4 @@ function ee_ven_setup_vimbadmin() /var/www/22222/htdocs/vimbadmin/bin/doctrine2-cli.php orm:schema-tool:create \ || ee_lib_error "Unable to setup ViMbAdmin default database , exit status = " $? - # Setup Nginx configuration to access ViMbAdmin - cp -v /usr/share/easyengine/mail/vma /etc/nginx/sites-available/ &>> $EE_COMMAND_LOG \ - || ee_lib_error "Unable to copy Nginx configuration for ViMbAdmin, exit status = " $? - - ln -sf /etc/nginx/sites-available/vma /etc/nginx/sites-enabled/ \ - || ee_lib_error "Unable to create softlink for ViMbAdmin, exit status = " $? - - } diff --git a/templates/mail/vma b/templates/mail/vma deleted file mode 100644 index fc15e31b..00000000 --- a/templates/mail/vma +++ /dev/null @@ -1,23 +0,0 @@ -# Nginx Configuration to access webmail -# Don't modify this file,After update EasyEngine replaces it with new version - -server { - server_name vma.*; - - access_log /var/log/nginx/vma.access.log; - error_log /var/log/nginx/vma.error.log; - - root /var/www/22222/htdocs/vimbadmin; - 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; - } - -} diff --git a/templates/nginx/22222 b/templates/nginx/22222 index 1ea0e1bd..44e50952 100644 --- a/templates/nginx/22222 +++ b/templates/nginx/22222 @@ -39,4 +39,23 @@ server { fastcgi_pass php; } + # ViMbAdmin Rules + location = /vimbadmin/ { + return 301 $scheme://$host:22222/vimbadmin/public/; + } + + location ~* \.(js|css|jpg|gif|png)$ { + root /var/www/22222/htdocs/; + } + + location ~* /vimbadmin/public/(.*)/(.*) { + root /var/www/22222/htdocs/vimbadmin/public; + try_files $uri $uri/ /vimbadmin/public/index.php?$args; + } + + location ~* /vimbadmin/public/(.*) { + root /var/www/22222/htdocs/vimbadmin/public; + try_files $uri $uri/ /vimbadmin/public/index.php?$args; + } + }