# This is a very quick how-to to make a self-signed certificate # with for two hostnames (using subjectAltName) # # * Store this file as ~/servercert.conf # * openssl req -new -x509 -nodes -config ~/servercert.conf \ # -out /usr/local/apache2/conf/ssl/servercert.pem \ # -keyout /usr/local/apache2/conf/ssl/serverkey.pem # [ req ] default_bits = 2048 default_days = 365 default_keyfile = serverkey.pem prompt = no encrypt_key = yes distinguished_name = req_distinguished_name x509_extensions = req_x509v3_ext [ req_distinguished_name ] countryName = AQ stateOrProvinceName = Antartica localityName = The Pole organizationName = Nowhere, inc. organizationalUnitName = The Middle commonName = www1.example.org emailAddress = hostmaster@example.org [ req_x509v3_ext ] nsCertType = server subjectAltName = DNS:www1.example.org,DNS:www2.example.org