resource log

Just another paikia site. But resourceful one

Posts Tagged ‘phpmyadmin

Get phpMyAdmin to work with Nginx

To get phpmyadmin to work with Nginx, here are the things need to add into /etc/nginx/sites-available/default

One thing to take note, the root suppose to be /usr/share but not directly /usr/share/phpmyadmin.

location /phpmyadmin{
     root    /usr/share;
     index   index.php;
}

location ~ \.php$ {
     set $php_root   $document_root;
         if ($request_uri ~* /phpmyadmin) {
             set $php_root /usr/share;
        }

     fastcgi_pass 127.0.0.1:9000;
     fastcgi_index index.php;
     fastcgi_param  SCRIPT_FILENAME  $php_root$fastcgi_script_name;
     include /etc/nginx/fastcgi_params;
}

As for the location to handle php file. Here is an explanation why the directive will get error http://stackoverflow.com/questions/1011101/nginx-location-directive-doesnt-seem-to-be-working-am-i-missing-something

Written by paikia

December 1, 2010 at 1:42 pm

Posted in linux

Tagged with ,

Follow

Get every new post delivered to your Inbox.