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