Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save luisfc/daabb72b56956f3abfcacbeb80dcb301 to your computer and use it in GitHub Desktop.
Save luisfc/daabb72b56956f3abfcacbeb80dcb301 to your computer and use it in GitHub Desktop.
Install phpMyAdmin Ubuntu 16.04 and php7-fpm
sudo apt update
sudo apt install phpmyadmin
This is a : no need to think setup for Ubuntu 16.04 with php7-fpm already installed.
Then copy paste just before the last } of the file the following block into /etc/nginx/sites-avaliable/default
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
Save and restart nginx with :
sudo service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment