Browse Source

Created ViMbAdmin Nginx rules

old-stable
gau1991 10 years ago
parent
commit
c23de7cfac
  1. 8
      src/vendor/ee_ven_setup_vimbadmin.sh
  2. 23
      templates/mail/vma
  3. 19
      templates/nginx/22222

8
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 = " $?
}

23
templates/mail/vma

@ -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;
}
}

19
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;
}
}

Loading…
Cancel
Save