Phpmyadmin and nginx

Sergej Kandyla sk.paix at gmail.com
Fri Apr 3 17:22:36 MSD 2009


uros678 пишет:
> Hello,
>
> I'm new to this forum and nginx, so please go easy on me. I have a question about setting up a server for phpmyadmin. I'm using debian lenny. Oh, and did I mention that I don't have "a lot" of web experience at all... :)
>
> I installed the phpmyadmin package from the debian repository and now I'm trying to setup the nginx site so that I could access the myphpadmin install like this http://myserver/phpmyadmin. I got to the point where phpinfo() is working if I type http://myserver/test.php. I tried to configure the config files to my best knowledge and with looking at config files on the wiki, but coudn't get it to work... 
>
> I don't understand if I must create a new virtual server for the myphpadmin install or can I somehow tell the main server or the default page that /phpmyadmin is located in /usr/share/phpmyadmin. I tried some config examples that I found on the net, but coudn't get it to work.
>
> Is there a documentation file that explains all the nginx.conf parameters? Or have I missed it somewhere?
>
> Thanks and best regards,
> Uros
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,753,753#msg-753
>
>
>   

Example configuration for phpmyadmin.
Please correct a root dir to phpmyadmin and specify a right php-fcgi socket.

#------ nginx.conf  phpmyadmin --------#

        location /phpmyadmin {
                root /usr/local/www;
                index index.php;
        }
        location ~ ^/phpmyadmin.+\.php$ {
                root /usr/local/www;
                fastcgi_index  index.php;
                fastcgi_pass unix:/tmp/php-fcgi.sock;
                fastcgi_param  SCRIPT_FILENAME    
$document_root$fastcgi_script_name;
                include        fastcgi_params;
                fastcgi_param HTTPS on;
        }

        location /phpMyAdmin {
                rewrite  ^/*  /phpmyadmin last;
               
        }
#-----------------------------------------#






More information about the nginx mailing list