Setup SSL in Your Local Development Environment with XAMPP
Need SSL for you dev work? I constantly found myself needing a “fake” SSL certificate for local development so my local setup could match my remote setups. Here’s how to do it with XAMPP on a Mac.
Drop into Terminal, and
- Generate a private key:
openssl genrsa -des3 -out server.key 1024
- Generate the CSR and fill out the form (note, don’t worry about a challenge password (the 8th question)
openssl req -new -key server.key -out server.csr
- Configure SSL in httpd.conf for Apache:
cd /Applications/XAMPP/etc
sudo nano httpd.conf
- Search for # Secure (SSL/TLS) connections (line 480), uncomment (remove the # in front of…)
Include /Applications/XAMPP/etc/extra/httpd-ssl.conf
- Save the file (Control-O), open /Applications/XAMPP/etc/extra/httpd-ssl.conf
sudo nano /Applications/XAMPP/etc/extra/httpd-ssl.conf
- Edit the path to your certificate file created above. Around line 99 look for
SSLCertificateFile /Applications/XAMPP/etc/ssl.crt/server.crt
- If you created the certificate in your home directory, you could do
sudo cp ~/server.crt /Applications/XAMPP/etc/ssl.crt/server.crt
- Do the same for your SSLCertificateKeyFile (line 107)
sudo cp ~/server.key /Applications/XAMPP/etc/ssl.crt/server.key
- Use your XAMPP Control Panel to restart Apache
Got anything to say? Go ahead and leave a comment!
Archives
- January 2012
- December 2011
- November 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2010
- December 2009
- September 2009
- August 2009
- April 2009
- February 2009
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- May 2007
- April 2007
- March 2007
- January 2007
- December 2006
- October 2006
- August 2006



Posted under: