Configuring phpmyadmin

Ian Hobson ian at ianhobson.co.uk
Fri Jan 30 20:05:09 MSK 2009


Hi All,

I've been round and round this problem for days now - and I still can't 
get it sorted.

I'm using Unbuntu LTS, and phpmyadmin - standard installs.

So far I have a file visible in /etc/nginx/sites-available that contains:-
#  server for phpmyadmin
server {
    listen 80;
    server_name phpmyadmin.xxxxxxxxx.com;

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

   location ~ \.php$ {
      fastcgi_pass 127.0.0.1:9000;
      fastcgi_index index.php;
      fastcgi_param SCRIPT_FILENAME /usr/share$fastcgi_script_name;
   }
}

This serves the log-on screen, from url /phpmyadmin/index.php , and 
includes the logo (from  <img src="./themes/original/img/logo_right.png" 
id="imLogo"..   However, whatever I enter into the log-on boxes, I get 
the log-on screen back - without any error messages. I have to conclude 
that fastcgi is not recognising the post or it would say invalid 
user/password.

The <form line is ....

<form method="post" action="index.php" target="_parent">

1) How can I  get the URI  /phpmyadmin to serve  /phpmyadmin/index.php  ?

2) How to get the post passed back to the CGI script.

The fastcgi_params file is included at the http level, and contains....

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
# may be over-ridden at location level.
fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

fastcgi_index  index.php;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;

Regards

Ian






More information about the nginx mailing list