Localhost path to images directory

I have nginx and php5-fpm set up and working to serve /var/www/index.php
as localhost/index.php
That works fine. The images on the page are not showing up however. The
images are in a folder /var/www/images
The folder has same user/group permissions as the index page
I can see an image in my file manager at /var/www/images/key.gif and
gave it 777 permission
Page source shows image should be at relative path images/key.gif
Pageinfo (Firefox) says image should be at
http://localhost/images/key.gif
Typing directly in browser window http://localhost/images/key.gif gets a
404

Posted at Nginx Forum:

On Mon, Nov 21, 2011 at 02:21:03PM -0500, bizshop wrote:

Hi there,

That works fine. The images on the page are not showing up however. The
images are in a folder /var/www/images

Typing directly in browser window http://localhost/images/key.gif gets a
404

The error log probably tells you what file nginx failed to find.

Do you have “root /var/www;” in the server{} block, outside of all
location{}s?

f

Francis D. [email protected]

Thanks - that got me started in the right direction. Had to set images
path in the default conf. Not something I had to do with apache as
server, still learning this nginx!

Posted at Nginx Forum: