{"thread":{"id":"14085","subject":"Exec format error when using gitweb","startedAt":"2008-06-22T13:51:52Z","lastAt":"2008-06-22T14:47:33Z","messageCount":6,"participants":["Erez Zilber","Lea Wiemann","Luciano Rocha"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80612","messageId":"ce513bcc0806220651g5cf59516w3fc30a68d7f09e79@mail.gmail.com","threadId":"14085","inReplyTo":null,"subject":"Exec format error when using gitweb","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-22T13:51:52Z","receivedAt":"2008-06-22T13:51:52Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"Hi,\n\nI'm trying to config gitweb using v1.5.5.3. I'm able to see my\nrepositories (through gitweb) but I see the following errors in\n/var/log/httpd/error_log. Can anyone help?\n\n[Sun Jun 22 16:33:53 2008] [error] [client 172.16.0.7] (8)Exec format\nerror: exec of '/var/www/cgi-bin/gitweb/gitweb.css' failed, referer:\nhttp://kites/cgi-bin/gitweb/gitweb.cgi\n[Sun Jun 22 16:33:53 2008] [error] [client 172.16.0.7] Premature end\nof script headers: gitweb.css, referer:\nhttp://kites/cgi-bin/gitweb/gitweb.cgi\n[Sun Jun 22 16:33:53 2008] [error] [client 172.16.0.7] (8)Exec format\nerror: exec of '/var/www/cgi-bin/gitweb/git-logo.png' failed, referer:\nhttp://kites/cgi-bin/gitweb/gitweb.cgi\n[Sun Jun 22 16:33:53 2008] [error] [client 172.16.0.7] Premature end\nof script headers: git-logo.png, referer:\nhttp://kites/cgi-bin/gitweb/gitweb.cgi\n\nThanks,\nErez\n"},{"id":"80614","messageId":"485E5BD6.6060105@gmail.com","threadId":"14085","inReplyTo":"ce513bcc0806220651g5cf59516w3fc30a68d7f09e79@mail.gmail.com","subject":"Re: Exec format error when using gitweb","fromName":"Lea Wiemann","fromEmail":"lewiemann@gmail.com","sentAt":"2008-06-22T14:04:06Z","receivedAt":"2008-06-22T14:04:06Z","isPatch":false,"sender":{"key":"lewiemann@gmail.com","avatar":null},"body":"Erez Zilber wrote:\n> [Sun Jun 22 16:33:53 2008] [error] [client 172.16.0.7] (8)Exec format\n> error: exec of '/var/www/cgi-bin/gitweb/gitweb.css' failed, referer:\n\nRandom guess: Did you make the data files (.css, .png) executable by \naccident, so your server is trying to execute them?\n\n-- Lea\n"},{"id":"80616","messageId":"ce513bcc0806220711k5e8c5085qfa330b017d736142@mail.gmail.com","threadId":"14085","inReplyTo":"485E5BD6.6060105@gmail.com","subject":"Re: Exec format error when using gitweb","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-22T14:11:47Z","receivedAt":"2008-06-22T14:11:47Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Sun, Jun 22, 2008 at 5:04 PM, Lea Wiemann <lewiemann@gmail.com> wrote:\n> Erez Zilber wrote:\n>>\n>> [Sun Jun 22 16:33:53 2008] [error] [client 172.16.0.7] (8)Exec format\n>> error: exec of '/var/www/cgi-bin/gitweb/gitweb.css' failed, referer:\n>\n> Random guess: Did you make the data files (.css, .png) executable by\n> accident, so your server is trying to execute them?\n>\n\nThanks for the quick response. Yeah, I did that after I got\n\"Permission denied\" errors. Now, I chnaged it and it looks like this:\n\n[admin@kites ~]$ sudo ls -l /var/www/cgi-bin/gitweb\ntotal 192\n-rwxr-xr-x 1 apache root    164 Jun 19 13:57 git-favicon.png\n-rw-r--r-- 1 apache root    208 Jun 19 13:57 git-logo.png\n-rwxr-xr-x 1 apache root 170562 Jun 19 13:57 gitweb.cgi\n-rwxr-xr-x 1 apache root     79 Jun 22 16:29 gitweb_config.perl\n-rw-r--r-- 1 apache root   7112 Jun 19 13:57 gitweb.css\n\nand I get the following errors:\n\n[Sun Jun 22 17:06:08 2008] [error] [client 172.16.0.7] (13)Permission\ndenied: exec of '/var/www/cgi-bin/gitweb/gitweb.css' failed, referer:\nhttp://kites/cgi-bin/gitweb/gitweb.cgi\n[Sun Jun 22 17:06:08 2008] [error] [client 172.16.0.7] Premature end\nof script headers: gitweb.css, referer:\nhttp://kites/cgi-bin/gitweb/gitweb.cgi\n[Sun Jun 22 17:06:08 2008] [error] [client 172.16.0.7] (13)Permission\ndenied: exec of '/var/www/cgi-bin/gitweb/git-logo.png' failed,\nreferer: http://kites/cgi-bin/gitweb/gitweb.cgi\n[Sun Jun 22 17:06:08 2008] [error] [client 172.16.0.7] Premature end\nof script headers: git-logo.png, referer:\nhttp://kites/cgi-bin/gitweb/gitweb.cgi\n\nErez\n"},{"id":"80617","messageId":"485E5EDF.1030002@gmail.com","threadId":"14085","inReplyTo":"ce513bcc0806220711k5e8c5085qfa330b017d736142@mail.gmail.com","subject":"Re: Exec format error when using gitweb","fromName":"Lea Wiemann","fromEmail":"lewiemann@gmail.com","sentAt":"2008-06-22T14:17:03Z","receivedAt":"2008-06-22T14:17:03Z","isPatch":false,"sender":{"key":"lewiemann@gmail.com","avatar":null},"body":"Erez Zilber wrote:\n> -rw-r--r-- 1 apache root   7112 Jun 19 13:57 gitweb.css\n> \n> [Sun Jun 22 17:06:08 2008] [error] [client 172.16.0.7] (13)Permission\n> denied: exec of '/var/www/cgi-bin/gitweb/gitweb.css' failed, referer:\n\nApparently your web server is trying to execute gitweb.css even though \nits executable bit isn't set -- perhaps because it's located in the \ncgi-bin directory.  I suggest you open \nhttp://.../cgi-bin/gitweb/gitweb.css and try to get it to display the \nCSS file in your browser; this is a problem with your web server, not \nwith gitweb.\n\n(By the way, git-favicon.png and gitweb_config.perl shouldn't have their \nexecutable bits set either, since they're not CGI scripts.)\n\n-- Lea\n"},{"id":"80619","messageId":"20080622144240.GA18324@bit.office.eurotux.com","threadId":"14085","inReplyTo":"ce513bcc0806220651g5cf59516w3fc30a68d7f09e79@mail.gmail.com","subject":"Re: Exec format error when using gitweb","fromName":"Luciano Rocha","fromEmail":"luciano@eurotux.com","sentAt":"2008-06-22T14:42:40Z","receivedAt":"2008-06-22T14:42:40Z","isPatch":false,"sender":{"key":"luciano@eurotux.com","avatar":null},"body":"On Sun, Jun 22, 2008 at 04:51:52PM +0300, Erez Zilber wrote:\n> Hi,\n> \n> I'm trying to config gitweb using v1.5.5.3. I'm able to see my\n> repositories (through gitweb) but I see the following errors in\n> /var/log/httpd/error_log. Can anyone help?\n> \n> [Sun Jun 22 16:33:53 2008] [error] [client 172.16.0.7] (8)Exec format\n> error: exec of '/var/www/cgi-bin/gitweb/gitweb.css' failed, referer:\n> http://kites/cgi-bin/gitweb/gitweb.cgi\n\nIf cgi-bin is configured as ScriptAlias in Apache httpd server, then it\nwill try to execute every file inside that directory. You should move\nthem elsewere, or use a different directory altogether, with ExecCGI\npermissions.\n\n-- \nLuciano Rocha <luciano@eurotux.com>\nEurotux Informática, S.A. <http://www.eurotux.com/>\n"},{"id":"80620","messageId":"ce513bcc0806220747x38cf83c2g7cd355f34c090de2@mail.gmail.com","threadId":"14085","inReplyTo":"485E5EDF.1030002@gmail.com","subject":"Re: Exec format error when using gitweb","fromName":"Erez Zilber","fromEmail":"erezzi.list@gmail.com","sentAt":"2008-06-22T14:47:33Z","receivedAt":"2008-06-22T14:47:33Z","isPatch":false,"sender":{"key":"erezzi.list@gmail.com","avatar":null},"body":"On Sun, Jun 22, 2008 at 5:17 PM, Lea Wiemann <lewiemann@gmail.com> wrote:\n> Erez Zilber wrote:\n>>\n>> -rw-r--r-- 1 apache root   7112 Jun 19 13:57 gitweb.css\n>>\n>> [Sun Jun 22 17:06:08 2008] [error] [client 172.16.0.7] (13)Permission\n>> denied: exec of '/var/www/cgi-bin/gitweb/gitweb.css' failed, referer:\n>\n> Apparently your web server is trying to execute gitweb.css even though its\n> executable bit isn't set -- perhaps because it's located in the cgi-bin\n> directory.  I suggest you open http://.../cgi-bin/gitweb/gitweb.css and try\n> to get it to display the CSS file in your browser; this is a problem with\n> your web server, not with gitweb.\n\nI moved gitweb outside of cgi-bin and now it works OK. Thanks!\n\n>\n> (By the way, git-favicon.png and gitweb_config.perl shouldn't have their\n> executable bits set either, since they're not CGI scripts.)\n>\n\nSure.\n\nThanks,\nErez\n> -- Lea\n>\n"}]}