Posting a form with SSL with Mozilla
Thomas Cramer <[email protected]> Thu, 09 Sep 2004 15:45:55 -0400
| Newsgroups | gmane.comp.apache.mod-layout |
|---|---|
| Message-ID | <[email protected]> |
I have seen many postings on this mailing list regrading form POST
through Mozilla problems and the fix to set "KeepAlive Off." I have
done this and it did fix my problem when accessing the site through HTTP
but not HTTPS. When I try to post a form via HTTPS it just hangs there;
it does eventually stop with an error in the error_log siting "copy
script args timed out." It is only in Mozilla and not IE and only works
in Mozilla when I remove the mod_layout directives. Also though I
haven't tested it throughly, on my Mac with Safari the page does post
but the form values do not seem to be posted. This site is a perl CGI,
if that matters. Any help would be greatly appreciated. Thanks in
advanced.
My server info: Apache/1.3.31 (Unix) mod_layout/3.2 PHP/4.3.6
mod_perl/1.29 mod_ssl/2.8.17 OpenSSL/0.9.7a
My CGI:
#!/usr/bin/perl
use CGI qw/:standard/;
print "Content-Type:text/html\n";
print "Pragma: no-cache\n\n";
print "<html><body>";
%input = parseForm();
print "VALUE = ".$input{"value"} ."\n";
printForm();
print "</body></html>";
sub printForm {
my $query = $ENV{"QUERY_STRING"};
print << "EOS";
<br>QUERY: $query<br>
<form action="test.cgi?$query" method="posts" name="preval"
id="preval">
VALUE <input type="text" name="value" value =" " size=10>
<br>
<input type="submit" border=0 name="Enter Value" value="Enter
Value" alt="Enter Value" src="astart.gif" align="BOTTOM">
</form>
EOS
}
sub parseForm {
my $q = new CGI;
return $q->Vars;
}
My http.conf:
ServerType standalone
ServerRoot "/var/local/httpd-1.3.31"
PidFile /var/local/httpd-1.3.31/logs/httpd.pid
ScoreBoardFile /var/local/httpd-1.3.31/logs/httpd.scoreboard
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0
LoadModule auth_ldap_module libexec/auth_ldap.so
LoadModule layout_module libexec/mod_layout.so
Port 80
<IfDefine SSL>
Listen 80
Listen 443
</IfDefine>
User nobody
Group nobody
ServerAdmin [email protected]
ServerName wwwdev.musc.edu
DocumentRoot "/var/local/httpd-1.3.31/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/local/httpd-1.3.31/htdocs">
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
AllowOverride AuthConfig Options FileInfo Limit
Order allow,deny
Allow from all
##
## My mod_layout directive
##
LayoutHeader "<font color=red><center><b>DEVELOPMENT
WEBSERVER</b></center></font>"
</Directory>
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
RedirectMatch ^/\~(.*)$ http://people.musc.edu/~$1
<IfModule mod_dir.c>
DirectoryIndex index.html index.shtml index.cgi index.php
</IfModule>
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
UseCanonicalName Off
<IfModule mod_mime.c>
TypesConfig /var/local/httpd-1.3.31/conf/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /var/local/httpd-1.3.31/conf/magic
</IfModule>
PerlSetEnv PERL5LIB /var/local/perllib
PerlModule Apache::Registry
HostnameLookups Off
ErrorLog /var/local/httpd-1.3.31/logs/error_log
LogLevel debug
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/local/httpd-1.3.31/logs/access_log combined
ServerSignature Off
<IfModule mod_alias.c>
Alias /icons/ "/var/local/httpd-1.3.31/icons/"
<Directory "/var/local/httpd-1.3.31/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/var/local/httpd-1.3.31/cgi-bin/"
<Directory "/var/local/httpd-1.3.31/cgi-bin">
AllowOverride Authconfig Indexes
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</IfModule>
<IfModule mod_autoindex.c>
IndexOptions FancyIndexing
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
ReadmeName README
HeaderName HEADER
IndexIgnore */.??* *~ *# HEADER* */README* */RCS */CVS *,v *,t
</IfModule>
<IfModule mod_mime.c>
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .sv
AddLanguage cs .cz .cs
AddLanguage ru .ru
AddLanguage zh-TW .zh-tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
<IfModule mod_negotiation.c>
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru
ltz ca es sv tw
</IfModule>
AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddHandler cgi-script .cgi .pl
AddType application/x-httpd-php .php
AddType text/html .shtml
AddHandler server-parsed .shtml
</IfModule>
NameVirtualHost 128.23.203.35
NameVirtualHost 128.23.203.38
<VirtualHost 128.23.203.35>
ServerName wwwdev.musc.edu
DocumentRoot /var/local/httpd-1.3.31/htdocs
KeepAlive Off
</VirtualHost>
<VirtualHost 128.23.203.35>
ServerName webcontroldev.musc.edu
DocumentRoot /files1/dept_html/webcontroldev
KeepAlive Off
User hostdb
Group hostdb
ErrorLog /var/local/httpd/logs/webcontrol_error_log
CustomLog /var/local/httpd/logs/webcontrol_access_log combined
<Directory "/files1/dept_html/webcontroldev">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride AuthConfig Options FileInfo Limit
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 128.23.203.38:80>
ServerName webcontrol.musc.edu
DocumentRoot /files1/dept_html/webcontrolprod
KeepAlive Off
ErrorLog /var/local/httpd/logs/webcontrolprod_error_log
CustomLog /var/local/httpd/logs/webcontrolprod_access_log combined
Redirect / https://webcontrol.musc.edu/
</VirtualHost>
<IfDefine SSL>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfDefine>
<IfModule mod_ssl.c>
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/var/local/httpd-1.3.31/logs/ssl_scache
SSLSessionCacheTimeout 300
SSLMutex file:/var/local/httpd-1.3.31/logs/ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLLog /var/local/httpd-1.3.31/logs/ssl_engine_log
SSLLogLevel debug
</IfModule>
<IfDefine SSL>
<VirtualHost 128.23.203.38:443>
ServerName webcontrol.musc.edu
DocumentRoot /files1/dept_html/webcontrolprod
KeepAlive Off
ServerAdmin [email protected]
User hostdb
Group hostdb
ErrorLog /var/local/httpd/logs/webcontrolprod_error_log
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\""
TransferLog /var/local/httpd-1.3.31/logs/access_log
<Directory "/files1/dept_html/webcontrolprod">
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
AllowOverride AuthConfig Options FileInfo Limit
Order allow,deny
Allow from all
</Directory>
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile
/var/local/httpd-1.3.31/conf/ssl.crt/webcontrol.server.crt
SSLCertificateKeyFile
/var/local/httpd-1.3.31/conf/ssl.key/webcontrol.server.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/local/httpd-1.3.31/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
CustomLog /var/local/httpd-1.3.31/logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
<VirtualHost 128.23.203.35:443>
DocumentRoot "/var/local/httpd-1.3.31/htdocs"
KeepAlive Off
ServerName wwwdev.musc.edu
ServerAdmin [email protected]
ErrorLog /var/local/httpd-1.3.31/logs/error_log
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
TransferLog /var/local/httpd-1.3.31/logs/access_log
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /var/local/httpd-1.3.31/conf/ssl.crt/server.crt
SSLCertificateKeyFile /var/local/httpd-1.3.31/conf/ssl.key/server.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/local/httpd-1.3.31/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
CustomLog /var/local/httpd-1.3.31/logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
</IfDefine>