maybe chmod 0644 'nginx/templates/iredadmin.tmpl'
maybe chmod 0644 'nginx/templates/misc.tmpl'
maybe chmod 0644 'nginx/templates/php-catchall.tmpl'
+maybe chmod 0644 'nginx/templates/phpmyadmin.tmpl'
maybe chmod 0644 'nginx/templates/redirect_to_https.tmpl'
maybe chmod 0644 'nginx/templates/roundcube.tmpl'
maybe chmod 0644 'nginx/templates/sogo.tmpl'
include /etc/nginx/templates/roundcube.tmpl;
include /etc/nginx/templates/iredadmin.tmpl;
include /etc/nginx/templates/sogo.tmpl;
+ include /etc/nginx/templates/phpmyadmin.tmpl;
# PHP applications. WARNING: php-catchall.tmpl should be loaded after
# other php web applications.
--- /dev/null
+# phpmyadmin
+location /phpmyadmin {
+ alias /usr/share/phpmyadmin;
+ index index.php;
+}
+
+location ~ ^/phpmyadmin/libraries {
+ deny all;
+}
+
+location ~ ^/phpmyadmin/setup/lib {
+ deny all;
+}
+
+location ~ ^/phpmyadmin/setup/(.+\.php)$ {
+ include fastcgi_params;
+ auth_basic "phpMyAdmin Setup";
+ auth_basic_user_file "/etc/phpmyadmin/htpasswd.setup";
+ alias /usr/share/phpmyadmin/setup/$1;
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+ fastcgi_pass php_workers;
+ fastcgi_index index.php;
+}
+
+location ~ ^/phpmyadmin/(.+\.php)$ {
+ include fastcgi_params;
+ alias /usr/share/phpmyadmin/$1;
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+ fastcgi_pass php_workers;
+ fastcgi_index index.php;
+}
+
+location ~ ^/phpMyAdmin {
+ rewrite ^/* /phpmyadmin last;
+}
+