<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Is it also possible to change my php directive to:<div><br></div><div><div>&nbsp;location ~ \.php$ {</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;root &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_pass &nbsp; 127.0.0.1:9000;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_index &nbsp;index.php;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_param &nbsp;SCRIPT_FILENAME &nbsp;html$fastcgi_script_name;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_params;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div><br></div><div>?? Will it do the same?</div><br><div></div><br><br><br><br>&gt; Date: Sun, 27 Feb 2011 12:50:35 +0000<br>&gt; From: francis@daoine.org<br>&gt; To: nginx@nginx.org<br>&gt; Subject: Re: nginx can't read images<br>&gt; <br>&gt; On Sun, Feb 27, 2011 at 04:47:00AM +0000, Aditya Herlambang wrote:<br>&gt; <br>&gt; Hi there,<br>&gt; <br>&gt; &gt; So it seems that mginx can't read a url with .png, for example<br>&gt; <br>&gt; nginx usually does exactly what you tell it to. In this case...<br>&gt; <br>&gt; &gt; http://20.16.31.42/phpMyAdmin/themes/original/img/logo_right.png<br>&gt; &gt; that gives me a page not found. The ip address above has been changed (not the original one), it'sjust to give illustration. I checked that the file logo_right.png is in fact in that folder. What do I need to do to solve this?<br>&gt; <br>&gt; ...what folder is the file logo_right.png in?<br>&gt; <br>&gt; Your config tells nginx to look for<br>&gt; <br>&gt; /usr/local/nginx/html/phpMyAdmin/themes/original/img/logo_right.png<br>&gt; <br>&gt; but your config also suggests that you wanted to tell nginx to look for<br>&gt; <br>&gt; /usr/share/nginx/html/phpMyAdmin/themes/original/img/logo_right.png<br>&gt; <br>&gt; Each (sub)request in nginx in handled by one location{} block, so you<br>&gt; must make sure that the correct config is in the location block that is<br>&gt; used for this specific request. Your location{} for .png urls uses the<br>&gt; compile-time document root value.<br>&gt; <br>&gt; If this server is new, and not used for other files or services, then<br>&gt; the best change is probably to remove all "root" directives from your<br>&gt; nginx.conf, and add a single "root /usr/share/nginx/html;" outside all<br>&gt; location{}s, just after "server_name  localhost;"<br>&gt; <br>&gt; Otherwise, you should probably add a "location /phpMyAdmin/ {}" which<br>&gt; contains other location{}s for the new urls you care about.<br>&gt; <br>&gt; Note also that the distributed phpMyAdmin includes a few .htaccess files<br>&gt; to attempt to limit access to some files. There's nothing in your config<br>&gt; to mimic that, so unless you've taken other steps, you may be exposing<br>&gt; more that the phpMyAdmin developers consider wise.<br>&gt; <br>&gt; Good luck with it,<br>&gt; <br>&gt;         f<br>&gt; -- <br>&gt; Francis Daly        francis@daoine.org<br>&gt; <br>&gt; _______________________________________________<br>&gt; nginx mailing list<br>&gt; nginx@nginx.org<br>&gt; http://nginx.org/mailman/listinfo/nginx<br></div>                                               </body>
</html>