[wellylug] Configuring web site files to display images correctly

Grant McLean grant at mclean.net.nz
Wed Dec 6 09:01:33 NZDT 2006


On Wed, 2006-12-06 at 08:52 +1300, John Durham wrote:
> After trying to get images to display from my server for a couple of
> days, it seems I must be missing something important. Whether it is in
> the server configuration or the html code is hard to say. I've compared
> my html with what appeared on Jethro's website (it appears to be
> structurally similar and correct), I'm now wondering if there are any
> other config files unknown to me that require editing to get the site to
> find its images when visited by the public?
> 
> 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">
> 
> This could be a difference between configuration of the web files for
> use on a Ubuntu Linux server and the previous (windows server). What
> could I be missing, guys?

Your default Apache config file may include this line:

  Alias /images/ /usr/share/images/

The alias will /images/ will mask any directory of the same name in your
web root (e.g.: /var/www/images/).

You have two choices:

1. Remove the aliases line from the apache config (and restart apache)
2. Use a diffferent name for you images directory

I'd go with the first one.

Regards
Grant




More information about the wellylug mailing list