phpmyadmin is working

This commit is contained in:
2019-04-20 11:16:27 +02:00
parent 0518a69864
commit 81a0dff38c
2 changed files with 86 additions and 40 deletions
+42 -1
View File
@@ -21,7 +21,7 @@ server {
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html index.php;
index index.html index.htm index.php;
server_name _;
@@ -31,6 +31,47 @@ server {
try_files $uri $uri/ =404;
}
location /phpmyadmin {
root /usr/share/webapps/;
# Deny static files
location ~ ^/phpMyAdmin/(README|LICENSE|ChangeLog|DCO)$ {
deny all;
}
# Deny .md files
location ~ ^/phpMyAdmin/(.+\.md)$ {
deny all;
}
# Deny setup directories
location ~ ^/phpMyAdmin/(doc|sql|setup)/ {
deny all;
}
location ~ ^/phpmyadmin/(.+\.php)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
try_files $uri $document_root$fastcgi_script_name =404;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTP_PROXY "";
fastcgi_param HTTPS on;
fastcgi_request_buffering off;
}
location ~ ^/phpmyadmin/(.*\.(eot|otf|woff|ttf|css|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|xls|tar|bmp))$ {
root /usr/share/webapps/;
expires 30d;
log_not_found off;
access_log off;
}
}
# pass PHP scripts to FastCGI server
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;