[users@httpd] Cannot browse an image file under a cgi directory.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello folks, I am trying to monitor a squid box, but I am having
problems with Apache's configuration.

Environment
Fedora 4
Kernel 2.6.15
Perl v5.8.6
rrdtool-1.0.49-5
Apache: httpd-2.0.54-10.3

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

Reference: http://www.squid-cache.org/~wessels/squid-rrd.

Almost everything is working as expected, except for the fact that
when I hit http://10.4.10.201/squidstats/1day.cgi, 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 10.4.51.202] (8)Exec format
error: exec of  /var/www/html/squid/select.day.png' failed, referer:
http://10.4.10.201/squidstats/1day.cgi
[Fri Feb 24 09:20:05 2006] [error] [client 10.4.51.202] Premature end
of script headers: select.day.png, referer:
http://10.4.10.201/squidstats/1day.cgi
...

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
</Directory>

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,

AL

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux