phpmyadmin + LEMP Server on Ubuntu 12.04 (Precise Pangolin)
I am running a LEMP server on my linode, set up according to the walkthrough (
I currently have several sites running and I want a gui to manage mySQL. I've begun to install phpmyadmin (using
sudo apt-get install phpmyadmin
I am asked which server to automatically configure phpMyAdmin for but nginx is not an option - my two options are "apache2" and "lightlpd" (I'm thinking I have these installed from some initial tinkering I did while finding a suitable web server configuration.) I am running all of my websites + databases on nginx so I am confused why "nginx" doesn't appear in the phpmyadmin configuration option.
Does anyone have a reliable set of instructions for installing phpmyadmin on a LEMP server that has several active databases?
I definitely don't want to muck up my server or lose database information.
2 Replies
In nginx it's simple, something like this is a good starting point (from
server {
listen 81;
server_name localhost;
root /usr/share/phpmyadmin;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.+)$ /index.php?url=$1 last;
break;
}
location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
Don't just copy and paste that code, I'm assuming you know a little bit about about nginx/php-fpm etc. You'll need to adjust the lines appropriately to your needs and I'd suggest adding additional levels of security (ip address allow/deny at a min).