wasntme0418
Programmer
I 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/<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/
Options Indexes FollowSymLinks ExecCGI
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/
<IfModule mod_cgid.c>
Scriptsock run/httpd.cgid
</IfModule>
<Directory "/var/ 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.
<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/<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/
Options Indexes FollowSymLinks ExecCGI
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/
<IfModule mod_cgid.c>
Scriptsock run/httpd.cgid
</IfModule>
<Directory "/var/ 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.