]> Frank Brehm's Git Trees - config/sarah/etc.git/commitdiff
daily autocommit
authorFrank Brehm <frank@brehm-online.com>
Sat, 17 Sep 2016 04:25:55 +0000 (06:25 +0200)
committerFrank Brehm <frank@brehm-online.com>
Sat, 17 Sep 2016 04:25:55 +0000 (06:25 +0200)
.etckeeper
nginx/conf.d/00-default.conf
nginx/templates/phpmyadmin.tmpl [new file with mode: 0644]

index 2c5315c34cbcf772f0b20348a23e296348ba0005..4f7795c326c7c3d741363d41d0ba0df2a52a0683 100755 (executable)
@@ -799,6 +799,7 @@ maybe chmod 0644 'nginx/templates/hsts.tmpl'
 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'
index c9eece2a73e47279a3a7392f8f738632d404cfdc..083cd156e0c5e33d91d3066c3758fd9882045eeb 100644 (file)
@@ -48,6 +48,7 @@ server {
     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.
diff --git a/nginx/templates/phpmyadmin.tmpl b/nginx/templates/phpmyadmin.tmpl
new file mode 100644 (file)
index 0000000..228199b
--- /dev/null
@@ -0,0 +1,36 @@
+# 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;
+}
+