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 ~ /\. {