"Scott R. Godin" wrote:
> 
> is there a reasonably simple way for a cgi script to tell whether it's
> being accessed through SSL or not? just curious. I'd like to play with
> the thought a bit, and want to have my test script report an error if it
> gets accessed without SSL.

hi scott, i didn't see anyone reply to your request, so i'll take a
stab.

the way i normally set up code that needs to run on an ssl is to create
2 cgi-bins.  for example (note that these apache configuration
directives are incomplete):

<VirtualHost 192.168.0.2>
  DocumentRoot /home/httpd/html/vhosts/somedomain.com/html
  ScriptAlias /cgi-bin/
"/home/httpd/html/vhosts/somedomain.com/cgi-bin/"
</VirtualHost>

<VirtualHost 192.168.0.2:443>
  DocumentRoot /home/httpsd/html/vhosts/somedomain.com/html
  ScriptAlias /cgi-bin/
"/home/httpsd/html/vhosts/somedomain.com/cgi-bin/"
</VirtualHost>

then, put a redirection script in the httpd cgi-bin that points to the
file in the httpsd cgi-bin.  hope this helps.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to