Hello!<div><br></div><div>I had the same problem and Igor said that nginx does not handle (yet?) nested locations. So you have to write in this way:</div><div><br></div><div>location /phpmyadmin/ {<br>alias /usr/share/phpmyadmin/;<br>
index index.php index.html index.htm;<br>location ~ ^/phpmyadmin/(.+\.php)$ {<br>alias /usr/share/phpmyadmin/$1;<br>fastcgi_pass <a href="http://127.0.0.1:9002">127.0.0.1:9002</a>;<br>fastcgi_index index.php;<br>fastcgi_param SCRIPT_FILENAME $request_filename;<br>
include fastcgi_params;<br>}<br>}<br><br></div><div>Bye,</div><div>a</div><div><br></div><div><div class="gmail_quote">On Mon, Sep 14, 2009 at 10:00 AM, SE7EN <span dir="ltr"><<a href="mailto:k1_zeus@yahoo.com">k1_zeus@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><p>I think i got it, if i add this, it works but the images of phpmyadmin don't show, maybe a permission issue ?</p>
<p><br></p><p></p><div class="im">ndex index.php index.htm index.html;<br>location ^~ /phpmyadmin/ {<br> root /usr/share;<br></div><div class="im"> include /usr/local/nginx/conf/fastcgi_params;<br></div><div class="im">
fastcgi_pass 127.0.0:9002;<br>}</div><p></p><p><br></p><p>location ~ \.php$ {</p><div class="im"><br>fastcgi_pass <a href="http://127.0.0.1:9002" target="_blank">127.0.0.1:9002</a>;<br>fastcgi_index index.php;<br></div>
<div class="im">fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;<br>include /usr/local/nginx/conf/fastcgi_params;<br>}<br></div><p></p><p><br></p><p><br></p><div class="im"><br>--- On <b>Mon, 9/14/09, Ian Hobson <i><<a href="mailto:ian@ianhobson.co.uk" target="_blank">ian@ianhobson.co.uk</a>></i></b> wrote:<br>
</div><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px"><div class="im"><br>From: Ian Hobson <<a href="mailto:ian@ianhobson.co.uk" target="_blank">ian@ianhobson.co.uk</a>><br>
Subject: Re: How to configure phpmyadmin with nginx ?<br>To:
<a href="mailto:nginx@sysoev.ru" target="_blank">nginx@sysoev.ru</a><br>Date: Monday, September 14, 2009, 12:52 AM<br><br></div><div><div></div><div class="h5"><div>Hi se7en,<br><br>Your location line is incorrect and you may need a line to send php over also. Try the following inside your server directive.<br>
<br>index index.php index.htm index.html;<br>location ^~ /phpmyadmin/ {<br> root /usr/share;<br> include /????/fastcgi_params;<br> fastcgi_pass 127.0.0:9002;<br>}<br>location ~ \.php {<br> include /????/fastcgi_params;<br>
fastcgi_pass <a href="http://127.0.0.1:9002" target="_blank">127.0.0.1:9002</a>;<br>}<br><br>Don't forget to replace the ??? with the correct path - mine is /etc/nginx/ and check that phpmyadmin<br>has been installed in /usr/share/phpmyadmin - or adjust the root.<br>
<br>Regards<br><br>Ian<br><br><br>SE7EN wrote:<br>> <br>> I added this,I verify it, everything is correct, my site works fine but accessing <a href="http://mydomain.com/phpmyadmin" target="_blank">http://mydomain.com/phpmyadmin</a> still doesn't work, a 500
server errror appears.<br>> <br>> location ~ /phpmyadmin/.*\.php$ {<br>> root /usr/share/;<br>> fastcgi_pass <a href="http://127.0.0.1:9002" target="_blank">127.0.0.1:9002</a>;<br>> fastcgi_index index.php;<br>
> include /usr/local/nginx/conf/fastcgi_params;<br>> fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;<br>> }<br>> <br>> location /phpmyadmin/ {<br>> root /usr/share/;<br>
> index index.php;<br>> }</div></div></div></blockquote></td></tr></tbody></table></blockquote></div></div>