Last active
March 23, 2020 01:03
-
-
Save gr1zix/05ad66085b115ea064fb94275533a8c1 to your computer and use it in GitHub Desktop.
phpmyadmin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /phpmyadmin { | |
#Auth | |
auth_basic "Restricted"; | |
auth_basic_user_file /etc/nginx/pma_pass; | |
expires modified +310s; | |
#Context | |
root /usr/share/; | |
index index.php; | |
try_files $uri $uri/ =404; | |
location ~ ^/phpmyadmin/(doc|sql|setup)/ { | |
deny all; | |
} | |
location ~ /phpmyadmin/(.+\.php)$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|png|ico|css|js|html|xml|text))$ { | |
root /usr/share/; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment