Answer the question
In order to leave comments, you need to log in
Why does my bin file download when I open phpmyadmin?
I have such a problem that when I open the localhost/phpmyadmin site, my page offers to download the bin file. If you take localhost:81/phpmyadmin then this content opens
My implementation in nginx
/etc/nginx/sites-available/default I added the following code
location /phpmyadmin {
root /usr/share/;
index index.htm index.html index.php;
location ~ ^/phpmyadmin/(.+.php)$ {
try_files $uri = 404;
root /usr/share/;
# fastcgi_pass 127.0.0.1:9000; # раскомментировать при использовании php5-cgi
fastcgi_pass unix:/var/run/php5-fpm.sock;
# раскомментировать при использовании php5-fpm
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+.(html|ico|xml|css|jpg|png|js|txt|gif|jpeg))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
}
NameVirtualHost *:81
Listen 127.0.0.1:81
Answer the question
In order to leave comments, you need to log in
If through apache2 then this was not enoughsudo apt-get install libapache2-mod-php7.0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question