[wellylug] re:Configuring web site files to display images correctly

michael at diaspora.gen.nz michael at diaspora.gen.nz
Wed Dec 6 16:49:52 NZDT 2006


John Durham writes:
>After re-reading some of the messages on this, I decided to avoid some
>of the earlier problems by changing the name of the images folder.
>Having done that, the link below is an example of what a local image
>link looks like (copied from a web page).
>file:///imgs/home.gif

That's a link to a file on the browser's local disk, not to one on the web
server.  

You earlier talked about "/images/ruler.gif"; if the browser has accessed
a page via "http", then that's a link to an image served up from the web
server; if the browser has accessed a page via "file", ie, read it off
disk, then that's a link to the literal file /images/ruler.gif, which is
unlikely to appear on your Ubuntu system anywhere.  (Apologies if this all
seems obvious, but I'm a bit mystified by the change in the example...)

>Images are still not visible, although all the pages have been updated
>to reflect the new path to the imgs directory. Nothing in the httpd.conf
>seemed especially relevant. Running short of ideas here.

There's several ideas that have been mentioned that you haven't reported
trying yet:

1. Is the file on disk called 'home.gif'?  (Linux is case sensitive,
Windows is not -- if you have a reference to 'home.gif', 'Home.gif'
won't work on a Linux system).

2. Does the file 'home.gif' have world readable permissions?  Does the
directory it is contained in have world readable permissions?

(For example, if you do the following at the command line:

    ls -l /var/www/modecideas.com/images

I'd expect to see the following cryptic string in the output:

    drwxr-xr-x

And:

    ls -l /var/www/modecideas.com/images/home.gif

Should show something like:

    -rw-r--r--

)

3. Take Ewen's suggestion, and look in /var/log/apache2/error.log; that should contain a message like:

    File does not exist: /var/www/modecideas.com/images/home.gif
or  Permission denied: /var/www/modecideas.com/images/home.gif

    -- michael.




More information about the wellylug mailing list