Friday 29 March 2013

SSL - Installation

Hi,

There are some tutorial how to install SSL in your server:
  1. Lighttpd:
    1. Create ssl folder in your server
    2. Create CSR file in your server: https://developers.google.com/search-appliance/kb/secure/external-ssl
      • Do not using special characters in your information input to your CSR file: # $ % @...
    3. Using the CSR file for buying a SSL service. After buying, you should received 2 or maybe 3 files, download and store it in your ssl folder:
      • Web Server CERTIFICATE: your-site.crt
        • -----BEGIN CERTIFICATE-----
          -----END CERTIFICATE-----
      • INTERMEDIATE CA: intermediate.crt
        • -----BEGIN CERTIFICATE-----
          -----END CERTIFICATE-----
    4. Create your pem file:
      • cat your-site.key your-site.crt > your-site.pem
    5. This is an example config file:
      • $HTTP["host"] == "your-site" {
            server.document-root = "/path/to/your/project"

            $SERVER["socket"] == ":443" {
                ssl.engine  = "enable"
                ssl.pemfile = "/path/to/your/pem/file"
                ssl.ca-file = "/path/to/your/intermediate/file"
            }
        }
    6. Auto redirect all site to HTTPS:
      • $SERVER["socket"] == ":80" {
            $HTTP["host"] =~ "(.*)" {
                url.redirect = ( "^/(.*)" => "https://%1/$1" )
            }
        }
    7. Restart Webserver and test in your browser: https://your-site
      • Amazon Server: you must enable security group HTTPS first
  2. Apache:

Good luck!

No comments:

Post a Comment