![]() |
|
#1
|
|||
|
|||
Apache with cgi configurationI am a newbe to linux and apache, but have a good understanding. I am taking over a server where cgi is not working, I get premature end of headers in error_log. Its redhat 7, apache 2.0.40. I have tried many configurations of the httpd.conf (with restart) no avail. I have rechecked permissions + ownership, nothing. here is a snipit of httpd.conf.
<IfModule prefork.c> LoadModule cgi_module modules/mod_cgi.so </IfModule> <IfModule worker.c> LoadModule cgid_module modules/mod_cgid.so </IfModule> User apache Group apache UseCanonicalName Off DocumentRoot "/var/www/html" <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> DirectoryIndex index.html index.html.var index.htm AccessFileName .htaccess <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> TypesConfig /etc/mime.types DefaultType text/plain <IfModule mod_mime_magic.c> # MIMEMagicFile /usr/share/magic.mime MIMEMagicFile conf/magic </IfModule> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <IfModule mod_cgid.c> Scriptsock run/httpd.cgid </IfModule> <Directory "/var/www/cgi-bin"> AllowOverride None Options +ExecCGI Order allow,deny AddHandler cgi-script .cgi .py .pl Allow from all </Directory> AddHandler cgi-script .cgi I am calling a very simple hello.cgi script that is in cgi-bin. The script runs fine on command line. I have also tried htaccess file, nothing. I don't think I understand part of the configuration, or just missing something. Thanks for any help. |
|
#2
|
|||
|
|||
|
Is there any more information in the error log? Specificly, the lines right above the "Premature end of headers". (possibly time stamped the same)
|
|
#3
|
|||
|
|||
|
I finally figured it out, but forgot to post here. I was uploading the cgi files incorrectly. The setup was correct, well enough to run cgi. Thanks
|
Recent GIDBlog
Toyota - 2008 August Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Apache / PHP problem, maybe output length? | HaganeNoKokoro | Apache Web Server Forum | 3 | 07-Aug-2008 04:42 |
| apache php no longer working (MX??) XP?? | ChicoMendez | Apache Web Server Forum | 5 | 30-Aug-2004 10:51 |
| Tomcat Apache mod_jk2 Caching Resource File | Govarthanan_k | Apache Web Server Forum | 0 | 12-Aug-2004 00:17 |
| Apache2 config issues | monev | Apache Web Server Forum | 2 | 28-Jun-2004 06:19 |
| regarding Apache configuration | dhaval2012 | Apache Web Server Forum | 2 | 19-Jun-2004 11:20 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The