setting up phpmyadmin with nginx within ubuntu 11.04
- by Patrick
I have nginx and php5-fpm running on ubuntu 11.04. I have installed phpmyadmin but im having trouble accessing it. I would like to access it via http://localhost/phpmyadmin
I've used all the default locations for the nginx, php5, and phpmyadmin installs.
I'm being directed to use the block below by the blog guide im following, but im not sure what to change to get it to point how im wanting it to.
server {
listen 80;
server_name php.example.com; // <-I know i need to edit this, but not sure to what.
access_log /var/log/nginx/localhost.access.log;
root /usr/share/phpmyadmin;
index index.php;
location / {
try_files $uri $uri/ @phpmyadmin;
}
location @phpmyadmin {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin/index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_NAME /index.php;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
include fastcgi_params;
}
}