From 677048f846d5cad2c837f695200665947c97bfee Mon Sep 17 00:00:00 2001 From: Mitesh Shah Date: Tue, 11 Jun 2013 13:18:50 +0530 Subject: [PATCH] Add PMA Support --- conf/nginx/common/locations.conf | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/conf/nginx/common/locations.conf b/conf/nginx/common/locations.conf index d0e73606..f562276f 100644 --- a/conf/nginx/common/locations.conf +++ b/conf/nginx/common/locations.conf @@ -1,7 +1,7 @@ # Common Locations - +# Basic Locations Files location = /favicon.ico { access_log off; log_not_found off; @@ -13,6 +13,34 @@ location = /robots.txt { log_not_found off; } +# PMA Settings +location /phpmyadmin { + root /usr/share/; + index index.php index.html index.htm; + + location ~ ^/phpmyadmin/(.+\.php)$ { + try_files $uri =404; + root /usr/share/; + fastcgi_pass php; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /etc/nginx/fastcgi_params; + } + + location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { + root /usr/share/; + } +} + +location /phpMyAdmin { + rewrite ^/* /phpmyadmin last; +} + +location /pma { + rewrite ^/* /phpmyadmin last; +} + + # Security Settings For Better Privacy location ~ /\. {