Welcome! Log In Create A New Profile

Advanced

RE: nginx can't read images

February 27, 2011 10:38AM
Is it also possible to change my php directive to:
location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME html$fastcgi_script_name; include fastcgi_params; }
?? Will it do the same?




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

nginx can't read images

equinox February 26, 2011 11:50PM

Re: nginx can't read images

unclepieman February 27, 2011 01:42AM

RE: nginx can't read images

equinox February 27, 2011 01:48AM

Re: nginx can't read images

Anonymous User February 27, 2011 02:14AM

RE: nginx can't read images

equinox February 27, 2011 02:18AM

RE: nginx can't read images

equinox February 27, 2011 02:26AM

RE: nginx can't read images

equinox February 27, 2011 02:30AM

Re: nginx can't read images

Francis Daly February 27, 2011 07:54AM

RE: nginx can't read images

equinox February 27, 2011 10:38AM

Re: nginx can't read images

Igor Sysoev February 27, 2011 10:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 164
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready