Click to See Complete Forum and Search --> : Redhat 7.2 & Apache woes...


spammy
11-07-2001, 11:53 AM
Installed RedHat 7.2 fine... almost all the packages etc. Came to try and setup Apache, runs basic webpages just fine but it will not run CGI's at all. HTTP 500 errors all over the place.

I put them in /var/www/cgi-bin/
I checked my httpd.conf - CGI module is loaded... ScriptAlias is setup properly (ScriptAlias /cgi-bin/ "/var/www/cgi-bin/")
I checked my error log when trying to run a cgi - "File not found" - which is BS - its definately there - and "Unexpected end of headers" - but i got that even with a simple hello.cgi - so thats not too ture also.
Fianlly, the cgi-bin and the file are chmodded properly (775 i think, I forget off hand)

I also ran the script from the terminal - "perl /var/www/cgi-bin/hello.cgi" which produced the correct result "Hello world from Perl 5.0.0.6"

Its a basic install of redhat 7.2 - nothing customised or anything yet - it includes Apache 1.3.20.

I've got RedHat 7.1 also at home, so that will be my next port of call if all else fails.

Thanks in advance,

Sam

freebsd
11-07-2001, 02:53 PM
Just reupload all your scripts in ASCII mode.

spammy
11-07-2001, 03:44 PM
They were uploaded in ASCII...
besides, if they were corrupt or something surely "perl hello.cgi" wouldnt work?

here's the result of that:
[root@ph0x root]# perl /var/www/cgi-bin/hello.cgi
Content-type: text/html

Hello world from PERL 5.006
<p>.cgi scripts are mapped to Perl.

spammy
11-07-2001, 04:12 PM
scrub that...

with a bit of tinkering... it fixed it!

thanks freebsd - you da man ;]

Sam