httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alvaro Listas" <>
Subject [users@httpd] Cannot browse an image file under a cgi directory.
Date Fri, 24 Feb 2006 14:38:55 GMT
Hello folks, I am trying to monitor a squid box, but I am having
problems with Apache's configuration.

Fedora 4
Kernel 2.6.15
Perl v5.8.6
Apache: httpd-2.0.54-10.3

Problem: Cannot browse an image file under a cgi directory.


Almost everything is working as expected, except for the fact that
when I hit, the browser shows
empty boxes with a red cross at the upper right corner. It does get
executed, and the images are generated; just cannot browse them.

The apache error log says:

[Fri Feb 24 09:20:05 2006] [error] [client] (8)Exec format
error: exec of  /var/www/html/squid/' failed, referer:
[Fri Feb 24 09:20:05 2006] [error] [client] Premature end
of script headers:, referer:

I get the same message for all the PNGs files.

My guess: Apache is trying to execute the PNGs files as if they were scripts.

I searched the net trying to find a solution, but got no success at
all. Unless I have overlooked something ...

A few pieces of my httpd.conf file:

DocumentRoot "/var/www/html"
AddHandler cgi-script .cgi
ScriptAlias /squidstats/ "/var/www/html/squid/"
<Directory "/var/www/html/squid/">
    AllowOverride All
    Options ExecCGI
    Order allow,deny
    Allow from all

I must be missing something. Must need to set/adjust some
parameter(s), just don't know which one(s).

I tried chmod 755 *.png, and as a last resource, even 777. No success.
Apache user owns the PNGs files.

As stated before, this is the only problem I am having, since all the
image files are getting updated when the script is executed through
the browser. If I copy the generated png files to DocumentRoot, I can
browse the generated image.

I would adjust the scripts to generate the images somewhere else if I
knew how to do that. Maybe this is the only solution, who knows?

Any help will be greatly appreciated.

Best regards,


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message