Hi there,
I updated apache from 1.3.9 up to 1.3.23 and my cgi files started behave weird. Most of them are not working in Netscape at all. You're able to see the code rather than the page and images. Others just don't work. At the same time if I transfer them to perl, they are working as perl scripts.
Here is a copy of my httpd.conf, please help me if you find anything.
###########################################################################################
# Server configuration
ServerType standalone
ServerRoot /usr/local/apache
PidFile /usr/local/apache/logs/httpd.pid
LockFile /usr/local/apache/logs/httpd.lock
Timeout 300
KeepAlive On
MaxKeepAliveRequests 300
KeepAliveTimeout 15
MinSpareServers 40
MaxSpareServers 50
StartServers 5
MaxClients 600
MaxRequestsPerChild 1000
Port 80
User www
Group www
ServerAdmin repair@adultfrontier.com
ServerName speedy.adultfrontier.net
RewriteCond %{HTTP_REFERER} !^RewriteRule .*\.(jpg|jpeg|gif|rm|ra|mpg)$ [R,L]
###########################################################################################
# Access Configuration
DocumentRoot /usr/local/apache/htdocs
UserDir disabled
DirectoryIndex index.html index.shtml index.phtml index.htm
AccessFileName .htaccess
<Directory />
Options None
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<FilesMatch "\.(htaccess|htpasswd)$">
Order allow,deny
Deny from all
</FilesMatch>
<Directory "/usr/local/apache/htdocs">
Options Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Alias /icons/ /usr/local/apache/icons/
<Directory "/usr/local/apache/icons">
Options MultiViews +ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/web1/users/*/*/">
Options Includes MultiViews +ExecCGI SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/web1/users/*/*/members/">
Options Includes MultiViews +ExecCGI SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/web1/http-stats/*/">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ScriptAlias /pub-bin/ /usr/local/pubcgi/sec_1_ret/
Alias /pub-files/ /usr/local/apache/pubfiles/
<Directory "/usr/local/apache/pubfiles">
Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>
###########################################################################################
# Misc Configuration
HostnameLookups Off
UseCanonicalName Off
ServerSignature Off
IndexOptions FancyIndexing
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
TypesConfig /usr/local/apache/conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/apache/conf/magic
</IfModule>
###########################################################################################
# Logs Configuration
#LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
ErrorLog /usr/local/apache/logs/error_log
CustomLog /usr/local/apache/logs/access_log combined
###########################################################################################
# Icons Configuration
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
###########################################################################################
# FileTypes/Language Configuration
AddDescription "GZIP compressed document" .gz
AddDescription "tar archive" .tar
AddDescription "GZIP compressed tar archive" .tgz
ReadmeName README
HeaderName HEADER
AddEncoding x-compress Z
AddEncoding x-gzip gz
AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it
LanguagePriority en fr de
AddType text/html .shtml .shtm
AddHandler server-parsed .shtml .shtm
###########################################################################################
# PHP4 Configuration
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php3 .php4 .php .phtml
LoadModule php4_module libexec/libphp4.so
###########################################################################################
# FastCGI Configuration
AddHandler fastcgi-script .fcgi
FastCgiSuexec On
FastCgiConfig -listen-queue-depth 30 -maxProcesses 100 -maxClassProcesses 5
###########################################################################################
# Browsers Configuration
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
###########################################################################################
# Web-based Control Panel
NameVirtualHost x.x.x.x
<VirtualHost x.x.x.x>
ServerName admin.speedy.adultfrontier.com
DocumentRoot /usr/local/apache/admin/docs
ScriptAlias /cgi/ /usr/local/apache/admin/cgi/
</VirtualHost>
Alias /site-manager /usr/local/apache/admin/docs/
<Directory "/usr/local/apache/admin">
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
###########################################################################################
I updated apache from 1.3.9 up to 1.3.23 and my cgi files started behave weird. Most of them are not working in Netscape at all. You're able to see the code rather than the page and images. Others just don't work. At the same time if I transfer them to perl, they are working as perl scripts.
Here is a copy of my httpd.conf, please help me if you find anything.
###########################################################################################
# Server configuration
ServerType standalone
ServerRoot /usr/local/apache
PidFile /usr/local/apache/logs/httpd.pid
LockFile /usr/local/apache/logs/httpd.lock
Timeout 300
KeepAlive On
MaxKeepAliveRequests 300
KeepAliveTimeout 15
MinSpareServers 40
MaxSpareServers 50
StartServers 5
MaxClients 600
MaxRequestsPerChild 1000
Port 80
User www
Group www
ServerAdmin repair@adultfrontier.com
ServerName speedy.adultfrontier.net
RewriteCond %{HTTP_REFERER} !^RewriteRule .*\.(jpg|jpeg|gif|rm|ra|mpg)$ [R,L]
###########################################################################################
# Access Configuration
DocumentRoot /usr/local/apache/htdocs
UserDir disabled
DirectoryIndex index.html index.shtml index.phtml index.htm
AccessFileName .htaccess
<Directory />
Options None
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<FilesMatch "\.(htaccess|htpasswd)$">
Order allow,deny
Deny from all
</FilesMatch>
<Directory "/usr/local/apache/htdocs">
Options Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Alias /icons/ /usr/local/apache/icons/
<Directory "/usr/local/apache/icons">
Options MultiViews +ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/web1/users/*/*/">
Options Includes MultiViews +ExecCGI SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/web1/users/*/*/members/">
Options Includes MultiViews +ExecCGI SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "/web1/http-stats/*/">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ScriptAlias /pub-bin/ /usr/local/pubcgi/sec_1_ret/
Alias /pub-files/ /usr/local/apache/pubfiles/
<Directory "/usr/local/apache/pubfiles">
Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>
###########################################################################################
# Misc Configuration
HostnameLookups Off
UseCanonicalName Off
ServerSignature Off
IndexOptions FancyIndexing
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
TypesConfig /usr/local/apache/conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/apache/conf/magic
</IfModule>
###########################################################################################
# Logs Configuration
#LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
ErrorLog /usr/local/apache/logs/error_log
CustomLog /usr/local/apache/logs/access_log combined
###########################################################################################
# Icons Configuration
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
###########################################################################################
# FileTypes/Language Configuration
AddDescription "GZIP compressed document" .gz
AddDescription "tar archive" .tar
AddDescription "GZIP compressed tar archive" .tgz
ReadmeName README
HeaderName HEADER
AddEncoding x-compress Z
AddEncoding x-gzip gz
AddLanguage en .en
AddLanguage fr .fr
AddLanguage de .de
AddLanguage da .da
AddLanguage el .el
AddLanguage it .it
LanguagePriority en fr de
AddType text/html .shtml .shtm
AddHandler server-parsed .shtml .shtm
###########################################################################################
# PHP4 Configuration
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php3 .php4 .php .phtml
LoadModule php4_module libexec/libphp4.so
###########################################################################################
# FastCGI Configuration
AddHandler fastcgi-script .fcgi
FastCgiSuexec On
FastCgiConfig -listen-queue-depth 30 -maxProcesses 100 -maxClassProcesses 5
###########################################################################################
# Browsers Configuration
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
###########################################################################################
# Web-based Control Panel
NameVirtualHost x.x.x.x
<VirtualHost x.x.x.x>
ServerName admin.speedy.adultfrontier.com
DocumentRoot /usr/local/apache/admin/docs
ScriptAlias /cgi/ /usr/local/apache/admin/cgi/
</VirtualHost>
Alias /site-manager /usr/local/apache/admin/docs/
<Directory "/usr/local/apache/admin">
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
###########################################################################################