Re: Strange behaviour with images & cgi-bin
Hi Garry,
I'm fairly new to apache but I had the same problem... the server
was looking in htdocs as that is the server root.... you should try
changing the <IMG SRC="images/whatever.gif"> to <IMG
SRC="cgi-bin/images/whatever.gif">
We you trying to point to your images htdocs/images directory? Or
your cgi-bin/images directory?
Hope I've helped.
Psychlone
Garry Short wrote:
> Hi all,
>
> I'm hoping someone can tell me what I'm doing wrong. I've a CGI script that
> outputs HTML, a part of which is a <IMG SRC="images/whatever.gif">
> construct.
>
> The CGI page is outputting correctly, except that the images don't show up!
> What am I doing wrong??
>
> Here's the relevant area from httpd.conf:
> --
> <VirtualHost *:1003>
> ServerName srv1.local
> DocumentRoot /data/web/srv1/htdocs
> Alias manual /data/web/srv1/htdocs/manual
> Alias images /data/web/srv1/htdocs/images
> ScriptAlias /cgi-bin/ "/data/web/srv1/cgi-bin/"
> Alias /images/ "/data/web/srv1/htdocs/images/"
> </VirtualHost>
> --
> Here's what's happening in error.log:
> --
> [Wed Jun 25 12:09:15 2003] [error] [client 127.0.0.1] script not found or
> unable to stat: /data/web/srv1/cgi-bin/images
> [Wed Jun 25 12:09:15 2003] [error] [client 127.0.0.1] script not found or
> unable to stat: /data/web/srv1/cgi-bin/images
> [Wed Jun 25 12:09:15 2003] [error] [client 127.0.0.1] script not found or
> unable to stat: /data/web/srv1/cgi-bin/images
> [Wed Jun 25 12:09:15 2003] [error] [client 127.0.0.1] script not found or
> unable to stat: /data/web/srv1/cgi-bin/images
> [Wed Jun 25 12:09:15 2003] [error] [client 127.0.0.1] script not found or
> unable to stat: /data/web/srv1/cgi-bin/images
> [Wed Jun 25 12:09:15 2003] [error] [client 127.0.0.1] script not found or
> unable to stat: /data/web/srv1/cgi-bin/images
> --
>
> It looks to me as though the images are being looked for in
> /data/web/srv1/cgi-bin/images, rather than where I specified
> (/data/web/srv1/htdocs/images).
>
> It also looks as though Apache is trying to treat the images as scripts
> (CGI, presumably). Is this purely because of where they're being looked
> for?
>
> If it helps, I'm using SuSE 8.1 and Apache 1.3.26
>
> Many thanks,
>
> Garry
>
>
|