Forum: NGINX Adding phpmyadmin to my default site

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.
Dieter Zinke (Guest)
on 2009-01-23 12:33
(Received via mailing list)
Originally I had a symlink in my document root that points to my
phpmyadmin install. Everything works fine, but maybe a symlink is not
the best solution. I don' t know, but i think so. I have now tried this
for my default site:

/etc/nginx/sites-available/default:

[...]

        location /phpmyadmin/ {
            alias   /usr/share/phpmyadmin/;
            index  index.php;
        }
        location ~ ^/phpmyadmin/.+\.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME
            /usr/share/$fastcgi_script_name;
            include fastcgi_params;
        }

  location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME
/var/www/nginx-testing$fastcgi_script_name;
                include fastcgi_params;

}
# EOF

The result is now, that the "Welcome to phpmyadmin" login page comes up,
but without css and the gifs used for styling this page. I can login and
and and use phpmyadmin, but all pages are without any kind of styling.
Is my config faulty and if, how can i correct it?
Igor S. (Guest)
on 2009-01-23 12:42
(Received via mailing list)
On Fri, Jan 23, 2009 at 01:53:40AM -0800, Dieter Zinke wrote:

>         location ~ ^/phpmyadmin/.+\.php$ {
>     fastcgi_param  SCRIPT_FILENAME  /var/www/nginx-testing$fastcgi_script_name;
>                 include fastcgi_params;
>
> }
> # EOF
>
> The result is now, that the "Welcome to phpmyadmin" login page comes up, but without css 
and the gifs used for styling this page. I can login and and and use phpmyadmin, but all 
pages are without any kind of styling. Is my config faulty and if, how can i correct it?

What configuration do you use before ? Where does symlink point to ?

BTW, you do not need "alias" here:

         location /phpmyadmin/ {
-            alias   /usr/share/phpmyadmin/;
+            rott    /usr/share;
             index  index.php;
         }
This topic is locked and can not be replied to.