ssl


Create self-signed SSL certificate for Nginx

First of all create the server key: openssl genrsa -des3 -out self-signed.key 2048 Enter a password twice and note it! Create the CSR (when requested, enter the password that you used above): openssl req -new -key self-signed.key -out self-signed.csr Answer the questions and put your domain name that you want to use the certificate for […]


Segmentation Fault using Zend Server with SSL and Curl

Using the apache module mod_ssl and the php extension curl may result in apache not running. Usually there's something like this in the logs: seg fault or similar nasty error detected in the parent process It took me quite a while to figure out how to get this working nevertheless, perhaps I can save someone else's time!! […]


Installing libssl0.9.8 on Debian Wheezy

Sometimes you run into the problem that libraries or packages are linked against libssl0.9.8, but the default version on Wheezy is libssl1.0.0. You can simply install the Squeeze package on Debian Wheezy like this (also having already installed libssl1.0.0): wget http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl0.9.8_0.9.8o-4squeeze14_amd64.deb dpkg -i libssl0.9.8_0.9.8o-4squeeze14_amd64.deb


Verify SSL certificate using OpenSSL

Use this command to verify the SSL certificate for the domain www.example.net: openssl s_client -showcerts -connect www.example.net:443 If you want to give the folder which contains the CA certificates (on Debian /etc/ssl/certs): openssl s_client -connect www.example.net:443 -showcerts -CApath /etc/ssl/certs If the certificate is correctly installed the result should contain at the end: Verify return code: […]


Redirecting to https using .htaccess

Based on HTTPS variable: RewriteCond %{HTTPS} !=on RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] Redirect everything that's not being served on port 443 to https: RewriteCond %{SERVER_PORT} !^443$ RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] Redirect everything served on port 80 to https: RewriteCond %{SERVER_PORT} ^80$ RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]