Forum: NGINX Phpmyadmin and nginx

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
uros678 (Guest)
on 2009-04-02 18:37
(Received via mailing list)
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
Yordan G. (Guest)
on 2009-04-02 21:47
(Received via mailing list)
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 <removed_email_address@domain.invalid> 
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/
Cliff W. (Guest)
on 2009-04-02 21:54
(Received via mailing list)
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/;
>         }

4. start PHP FCGI processes
5. fastcgi-pass to PHP

Cliff
Yordan G. (Guest)
on 2009-04-03 01:58
(Received via mailing list)
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. <removed_email_address@domain.invalid> 
wrote:

> 5. 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/
Edho P Arief (Guest)
on 2009-04-03 06:10
(Received via mailing list)
On Fri, Apr 3, 2009 at 12:37 AM, Yordan G. 
<removed_email_address@domain.invalid>
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.
Sergej Kandyla (Guest)
on 2009-04-03 17:33
(Received via mailing list)
uros678 пишет:
> 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;

        }
#-----------------------------------------#
uros678 (Guest)
on 2009-04-04 15:51
(Received via mailing list)
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: http://forum.nginx.org/read.php?2,753,785#msg-785
SSSlippy (Guest)
on 2009-04-14 01:32
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,753,1029#msg-1029
CryptWizard (Guest)
on 2009-04-14 02:07
(Received via mailing list)
It would probably be easier to create a symbolic link to phpMyAdmin
from inside your webroot.
SSSlippy (Guest)
on 2009-04-14 02:34
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,753,1031#msg-1031
CryptWizard (Guest)
on 2009-04-14 02:42
(Received via mailing list)
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
SSSlippy (Guest)
on 2009-04-14 03:18
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,753,1035#msg-1035
CryptWizard (Guest)
on 2009-04-14 03:23
(Received via mailing list)
Symbolic links will solve the auto update and caps problem.
As for "No input file specified", you will have to post your FastCGI
configuration.
SSSlippy (Guest)
on 2009-04-14 03:29
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,753,1036#msg-1036
CryptWizard (Guest)
on 2009-04-14 03:51
(Received via mailing list)
Ooops. Typo. Haha.
This topic is locked and can not be replied to.