<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><P>I added this,I verify it, everything is correct, my site works fine but accessing http://mydomain.com/phpmyadmin still doesn't work, a 500 server errror appears.</P><P></P><P>location ~ /phpmyadmin/.*\.php$ {<BR> root /usr/share/;<BR> fastcgi_pass 127.0.0.1:9002;<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> }<BR><BR><BR></P><BR>--- On <B>Sun, 9/13/09, Edho P Arief <I><edhoprima@gmail.com></I></B> wrote:<BR><BLOCKQUOTE style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left:
5px;"><BR>From: Edho P Arief <edhoprima@gmail.com><BR>Subject: Re: How to configure phpmyadmin with nginx ?<BR>To: nginx@sysoev.ru<BR>Date: Sunday, September 13, 2009, 9:31 AM<BR><BR><DIV class="plainMail">On Sun, Sep 13, 2009 at 4:54 AM, SE7EN<<A ymailto="mailto:k1_zeus@yahoo.com" href="/mc/compose?to=k1_zeus@yahoo.com">k1_zeus@yahoo.com</A>> wrote:<BR>> Hi, phpmyadmin is installed in /usr/share/phpmyadmin and i have the<BR>> following vhost configuration file. How to configure phpmyadmin so i can<BR>> use: <A href="http://mydomain.com/phpmyadmin" target="_blank">http://mydomain.com/phpmyadmin</A><BR>><BR>> Thank you<BR>><BR>> server {<BR>> listen 80;<BR>> server_name www.mydomain.com;<BR>><BR>> #redirect www to non-www<BR>> rewrite ^/(.*) <A href="http://mydomain.com/$1" target="_blank">http://mydomain.com/$1</A> permanent;<BR>><BR>><BR>> }<BR>><BR>><BR>> server {<BR>>
listen 80;<BR>> server_name mydomain.com;<BR>> access_log /home/mydomain/log/access.log;<BR>> error_log /home/mydomain/log/error.log;<BR>><BR><BR>location ~ /phpmyadmin/.*\.php$ {<BR> root /usr/share/;<BR> ....php fastcgi settings...;<BR>}<BR><BR>location /phpmyadmin/ {<BR> root /usr/share/;<BR> index index.php;<BR>}<BR><BR>><BR>><BR>> location / {<BR>> root /home/mydomain/public_html/;<BR>> index index.php index.html;<BR>> expires 30d;<BR>><BR>> #stop image and files hotlinking<BR>> location ~* ^.+\.(gif|jpg|png|swf|flv|rar|zip|jpeg|css)$ {<BR>> valid_referers none blocked mydomain.com www.mydomain.com *.google.com<BR>> *.yahoo.com;<BR>> if ($invalid_referer) {<BR>> return 444;<BR>> }<BR>> }<BR>><BR>> #joomla sef url's<BR>> if (!-e $request_filename) {<BR>> rewrite ^(.*)$ /index.php?q=$1 last;<BR>> break;<BR>>
}<BR>> }<BR>><BR>> if ( $args ~ "mosConfig_[a-zA-Z_]{1,21}(=|\%3d)" ) {<BR>> set $args "";<BR>> rewrite ^.*$ <A href="http://$host/index.php" target="_blank">http://$host/index.php</A> last;<BR>> return 403;<BR>> }<BR>><BR>> if ( $args ~ "base64_encode.*\(.*\)" ) {<BR>> set $args "";<BR>> rewrite ^.*$ <A href="http://$host/index.php" target="_blank">http://$host/index.php</A> last;<BR>> return 403;<BR>> }<BR>><BR>> if ( $args ~ "(\<|%3C).*script.*(\>|%3E)" ) {<BR>> set $args "";<BR>> rewrite ^.*$ <A href="http://$host/index.php" target="_blank">http://$host/index.php</A> last;<BR>> return 403;<BR>> }<BR>><BR>> if ( $args ~ "GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ) {<BR>> set $args "";<BR>> rewrite ^.*$ <A href="http://$host/index.php" target="_blank">http://$host/index.php</A> last;<BR>> return 403;<BR>>
}<BR>><BR>> if ( $args ~ "_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ) {<BR>> set $args "";<BR>> rewrite ^.*$ <A href="http://$host/index.php" target="_blank">http://$host/index.php</A> last;<BR>> return 403;<BR>> }<BR>><BR>><BR>><BR>> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<BR>> location ~ \.php$<BR>> {<BR>> fastcgi_pass 127.0.0.1:9000;<BR>> fastcgi_index index.php;<BR>> include /usr/local/nginx/conf/fastcgi_params;<BR>> fastcgi_param SCRIPT_FILENAME<BR>> /home/mydomain/public_html/$fastcgi_script_name;<BR>> }<BR>><BR>><BR>> ## All other errors get the generic error page<BR>> error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415<BR>> 416 417<BR>> 500 501 502 503 504 505 /error_page.html;<BR>> location $document_root/error_page.html {<BR>> internal;<BR>><BR>> }<BR>><BR>>
}<BR>><BR>><BR>><BR>><BR><BR><BR><BR>-- <BR>O< ascii ribbon campaign - stop html mail - www.asciiribbon.org<BR><BR></DIV></BLOCKQUOTE></td></tr></table><br>