To add SSL to your OS X testing server, you need to configure mod_ssl. Open Terminal and type the following commands: * sudo -s * cd /etc/httpd * mkdir ssl * chmod 700 ssl * cd ssl * gzip -c –best /var/log/system.log > random.dat * openssl rand -rand file:random.dat 0 You now need an SSL [...]
Continue reading...Saturday, September 20, 2008
Here’s a php code snippet to force the page to https instead of http. You can use a self-signed SSL certificate on your OS X testing server. <?php // force redirect to SSL secure page if($_SERVER['SERVER_PORT'] != '443') { header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); } ?>
Continue reading...
Saturday, September 20, 2008
1 Comment