[wellylug] Configuring web site files to display images correctly
Ewen McNeill
wellylug at ewen.mcneill.gen.nz
Wed Dec 6 12:44:25 NZDT 2006
In message <1165348366.19394.13.camel at localhost.localdomain>, John Durham writes
:
>Below is a sample of the html that contains an image, but doesn't
>display it:
><center><br><img src="/images/ruler.gif" height=31 width=500 alt="ruler">
If you're using a Debian derived distribution (Debian, Ubuntu, etc),
beware that by default it includes an Alias for /images that points at
the Apache distributed images directory. I wish they wouldn't call it
that, but it's been there through several releases.
What I normally do to work around it is define a more specialised alias
for the virtual host to put it back to the "right" location, eg:
Alias /images/ /var/www/mysite/images/
Failing that, have a look in /var/log/apache2/error.log (or wherever you
defined your error log file) and check to see what path it's trying to
use to retrieve the image, as it sounds like it's not looking in the
path you expect.
Ewen
More information about the wellylug
mailing list