LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache path/execution problem (https://www.linuxquestions.org/questions/linux-software-2/apache-path-execution-problem-512635/)

Seventh 12-21-2006 01:36 PM

Apache path/execution problem
 
Hi folks,

I have bugzilla installed, 2.22 on Debian running apache. I'm having a small problem.

Bugzilla installs to /usr/lib/cgi-bin, and my actual web root is /var/www. Bugzilla itself runs, but because the files are in /cgi-bin, it's not able to parse any .css or plain .html files - it thinks they're all scripts instead.

Here's a snippet from my logfile:

Quote:

[Wed Dec 20 14:04:31 2006] [error] (8)Exec format error: exec of /usr/lib/cgi-b\
in/bugzilla/skins/custom/global.css failed
[Wed Dec 20 14:04:31 2006] [error] [client 129.83.31.3] Premature end of script\
headers: /usr/lib/cgi-bin/bugzilla/skins/custom/global.css
[Wed Dec 20 14:04:31 2006] [error] (8)Exec format error: exec of /usr/lib/cgi-b\
in/bugzilla/skins/standard/global.css failed
[Wed Dec 20 14:04:31 2006] [error] [client 129.83.31.3] Premature end of script\
headers: /usr/lib/cgi-bin/bugzilla/skins/standard/global.css
[Wed Dec 20 14:04:31 2006] [error] (8)Exec format error: exec of /usr/lib/cgi-b\
in/bugzilla/skins/custom/index.css failed
[Wed Dec 20 14:04:31 2006] [error] [client 129.83.31.3] Premature end of script\
headers: /usr/lib/cgi-bin/bugzilla/skins/custom/index.css
It's finding and calling them, but because they're being called from outside of the web root, apache is trying to runthem (I think) instead of just parsing them as plain .css and .html files.

Any insight on fixing this would be very much appreciated. Cheers. :)

amocjr 12-22-2006 10:11 PM

Oh, I just re-read your post after I posted a reply and realized I misunderstood your problem. I had thought you were having trouble executing the cgi scripts. But it appears the problem you're having is that Apache is trying to execute plain old html files as if they were scripts.

I think you're right about being outside the document root. Apache is trying to execute them because they are where Apache is expecting to see scripts.

I don't know beans about Bugzilla, but is there a configuration file for it somewhere that you can use to tell it to put the css and html files in the Apache document root directory?

jeelliso 12-22-2006 10:12 PM

Change the location of your cgi-bin. It is in the Apache configuration file.

Alternatively, you could move all the contents of /usr/lib/cgi-bin to the cgi-bin of your Apache. Then turn /usr/lib/cgi-bin into a simlink that actually points to the Apache cgi-bin. This should enable Apache to parse these files as normal, but still allow Bugzilla to function properly, as long as it is able to follow simlinks.

~Justin

dombrowsky 03-28-2009 12:53 AM

I have the exact same problem. same error message and everything:

Code:

[Sat Mar 28 01:22:02 2009] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 configured -- resuming normal operations
[Sat Mar 28 01:22:20 2009] [error] [client 74.76.90.83] (13)Permission denied: exec of '/usr/lib/cgi-bin/bugzilla/skins/standard/index/front.png' failed

I tried adding the "FollowSymLinks" to the cgi-bin directory in /etc/apache2/sites-enabled/000-default, but that didn't change anything. It also appears that skin path is mandatory and cannot be changed to point to some other non-script location.

globestern 09-15-2009 08:09 AM

same problem here.. I run bugzilla under apache 2.2 and suexec..

any idea?

lintunen 12-15-2009 06:31 AM

I was getting a similar error message but for a different application (TPP = Trans Proteomic Pipeline) that had its file stored outside of the Apache document root.

The solution to the problem was to add an appropriate handler to the directory directive where the CGI scripts were stored to stop specific files types being handled as scripts. For example:

<Directory "/usr/local/tpp/cgi-bin">
...
AddHandler default-handler .jpg .png .css
...
</Directory>


All times are GMT -5. The time now is 11:04 PM.