I'm having some problems trying to execute a CGI script through apache. This script is identical to the OpenLayers proxy.cgi which allows to make AJAX requests outside of one's domain. This script runs smoothly and without any errors using normal apache configuration (without SSL), but! when I enable SSL, it starts to behave erratically.
Let me show you first my apache configuration for SSL:
NameVirtualHost *:443
<VirtualHost *:443>
ServerName 172.22.1.37
SSLEngine on
SSLProtocol all -SSLv2
SSLCertificateFile /etc/apache2/ca/apache-server.crt
SSLCertificateKeyFile /etc/apache2/ca/apache-server.key
SSLCertificateChainFile /etc/apache2/ca/proba.crt
SSLCACertificateFile /etc/apache2/ca/proba.crt
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
Alias /mapviewer "/var/www/mapviewer/"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AddHandler cgi-script .cgi
DocumentRoot /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -Multiviews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
So, SSL loads correctly, since I have tried other webapps and they run smoothly in https, the problem is this app that uses the proxy.cgi
Weird thing is that when I start apache, at the beginning it will work correctly without any problem, but after a time (I'm not sure if it's dependent on time or number of request, although after testing I'd say it's the former) when the javascript code calls this proxy.cgi script, the request will just hang there and, in the end, be aborted due to "timeout".
Do I need to enable any other option to execute cgi scripts through https? is there something I'm missing? I can put the proxy.cgi code but I don't think it has anything to do since it has proven to work correctly, the problem here is that with SSL enabled, it won't be executed.
Thanks for reading!