Phpmyadmin and nginx

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… :slight_smile:

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: Phpmyadmin and nginx

Ok. what comes next?

  1. apt-get install phpmyadmin -y
  2. nano /etc/nginx/nginx.conf
  3. insert this:

location /phpmyadmin {
alias /usr/share/phpmyadmin/;
}

On Thu, Apr 2, 2009 at 5:28 PM, uros678 [email protected] wrote:

config files to my best knowledge and with looking at config files on the
Thanks and best regards,
Uros

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,753,753#msg-753


Please excuse my bad english…

С уважение,
Й. Георгиев.

WEB: http://gigavolt-bg.net/
Blog: http://live.gigavolt-bg.net/

On Thu, 2009-04-02 at 20:37 +0300, Yordan G. wrote:

Ok. what comes next?

  1. apt-get install phpmyadmin -y
  2. nano /etc/nginx/nginx.conf
  3. insert this:
    location /phpmyadmin {
    alias /usr/share/phpmyadmin/;
    }
  1. start PHP FCGI processes
  2. fastcgi-pass to PHP

Cliff

Cliff, tnx!

4.1. spawn-fcgi / http://redmine.lighttpd.net/projects/spawn-fcgi - i
use
that
4.2. php-fpm / http://php-fpm.anight.org/

On Thu, Apr 2, 2009 at 8:46 PM, Cliff W. [email protected] wrote:

  1. fastcgi-pass to PHP
    have a question about setting up a server for phpmyadmin. I'm
    work...
    Thanks and best regards,

Please excuse my bad english…

С уважение,
Й. Георгиев.

WEB: http://gigavolt-bg.net/
Blog: http://live.gigavolt-bg.net/


Please excuse my bad english…

С уважение,
Й. Георгиев.

WEB: http://gigavolt-bg.net/
Blog: http://live.gigavolt-bg.net/

uros678 пишет:

Thanks and best regards,
Uros

Posted at Nginx Forum: Phpmyadmin and nginx

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;

    }

#-----------------------------------------#

Sergej Kandyla Wrote:

debian repository and now I’m trying to setup the
somehow tell the main server or the default page

Uros

unix:/tmp/php-fcgi.sock;
}
#----------------------------------------

Jeeej… thank you very much. This worked, just had to omit the HTTPS on
directive, because I don’t have nginx set up for https, maybe another
time…

Best regards,
Uros

Posted at Nginx Forum: Re: Phpmyadmin and nginx

On Fri, Apr 3, 2009 at 12:37 AM, Yordan G. [email protected]
wrote:

Ok. what comes next?

  1. apt-get install phpmyadmin -y
  2. nano /etc/nginx/nginx.conf
  3. insert this:

location /phpmyadmin {
alias /usr/share/phpmyadmin/;
}

it’ll return ‘no input file specified’ with such configuration. Static
files work but php files don’t.

It would probably be easier to create a symbolic link to phpMyAdmin
from inside your webroot.

Hate to ninja the thread Ive been trying to replicate this with php-fpm
but I keep getting “No Input file specified”.

Here is what is in my config. I am trying to load phpmyadmin into
admin.domain.com/phpmyadmin

phpMyAdmin Alias

    location /phpmyadmin {
            root /usr/local/www;
            index index.php;
    }
    location ~ ^/phpmyadmin.+\.php$ {
root /usr/local/www;
 fastcgi_index  index.php;
 fastcgi_pass  127.0.0.1:9000;
 include        fastcgi_params;
 fastcgi_param  CONTENT_TYPE  $content_type;
 fastcgi_param  CONTENT_LENGTH  $content_length;
 fastcgi_param  SCRIPT_NAME  $fastcgi_script_name;
 fastcgi_param  SCRIPT_FILENAME  /usr/local/www$fastcgi_script_name;
 fastcgi_param  REQUEST_URI  $request_uri;
 fastcgi_param  DOCUMENT_URI  $document_uri;
 fastcgi_param HTTPS on;
 fastcgi_intercept_errors  on;
    }
    location /phpMyAdmin {
            rewrite  ^/*  /phpmyadmin last;
    }

Posted at Nginx Forum:

I wanted to keep all my admin tools within my admin directory. Note
that is only part of my whole admin.domain.com file.

So from what you are saying I would be better off creating a new config
file for phpmyadmin?

Posted at Nginx Forum:

I run freebsd and I am attempting to allow the directory to auto update
with ports. Its the reason I have not moved phpmyadmin directly to the
folder.

The issue is phpmyadmin auto installs to /usr/local/www/phpMyAdmin which
has caps. I am trying to avoid using caps

Also note your idea still gives No Input file specified.

Posted at Nginx Forum:

Symbolic links will solve the auto update and caps problem.
As for “No input file specified”, you will have to post your FastCGI
configuration.

So I am assuming that you would have a seperate server { } block for
admin.domain.com, with a seperate root directive.

In your shell, cd to that directory and type
ls -s /usr/share/phpmyadmin phpmyadmin

And you shouldn’t have to touch nginx.conf any further if you already
have PHP setup correctly, and you can access it at
http://admin.domain.com/phpmyadmin

Ooops. Typo. Haha.

I was able to use that symbolic link i didnt realize I was typing ls
like in your example with it is ln. Thank you very much for the help!

Posted at Nginx Forum: