Hiya folks, I installed Apache 2 on my Gentoo system by "emerge apache2". Started daemon with "/etc/init.d/apache2 start" and browsed into http://localhost/~user/cgi- bin/test.cgi. Http error 500 hits on screen. Apache's errorlog contains a line: [snip] [Fri Jan 03 13:41:20 2003] [error] [client 192.168.0.2] Premature end of script headers: test.cgi [/snip] Guess: the script dies before sending output.. I move the script into /home/httpd/cgi-bin folder, which is a scriptalias'ed folder for http://localhost/cgi-bin. I browse http://localhost/cgi- bin/test.cgi and screen has text: "testing". The test.cgi contais next three lines: #!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html>testing</html>"; I disabled all apache (and apache2) "extra" modules that may interfere executing the script, restarted apache2 and no difference. Not any other modifactions were made, so all other is default in config files. [my make.conf contains:] USE="x86 -alsa apache2 apm arts avi crypt cups encode gif -gnome gpm gtk imap imlib java jpeg kde -ldap libg++ libwww mbox mikmod mmx motif mpeg ncurses nls oggvorbis opengl pam pdflib perl png python qt qtmt quicktime readline samba scanner sdl slang snmp spell ssl svga tcpd truetype X xml2 xmms xv zlib" CXXFLAGS="${CFLAGS}" CHOST='i586-pc-linux-gnu' CFLAGS='-march=pentium-mmx -mcpu=pentium-mmx -O3 -pipe' CXXFLAGS='-march=pentium-mmx -mcpu=pentium-mmx -O3 -pipe' ACCEPT_KEYWORDS="~x86" [/make.conf] Some of my system components' versions: gcc 3.2.1-r6 glibc 2.3.1-r3 perl 5.8.0-r7 apache 2.0.43-r1 gentoo-sources 2.4.19-r10
why dont you try adding this to your configuration... ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/public_html/cgi-bin/$2
added to commonapache2.conf