By curt00
There are two articles that explain how to add SSL:
How To Create a SSL Certificate on Apache for Ubuntu 12.04 https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04
How To Set Up Apache with a Free Signed SSL Certificate on a VPS https://www.digitalocean.com/community/articles/how-to-set-up-apache-with-a-free-signed-ssl-certificate-on-a-vps
DigitalOcean suggested that I follow the first article, which I did.
When editing /etc/apache2/sites-available/default-ssl, I entered something different for “ServerName” than what I entered for “Common Name” during the key generation. I think this is why I got the following error message when I ran “service apache2 reload”:
“Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName”
When I made the names consistent and followed some of the suggestions at http://stackoverflow.com/questions/9541460/httpd-could-not-reliably-determine-the-servers-fully-qualified-domain-name-us (which was suggested by Kamal Nasser on https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04), the error message no longer appeared. However, when I go to my domain on the browser, I still do not see HTTPS.
Does anyone have any suggestions on how to get this to work?
After trying many of the different suggestions, here is what I have. Here is my terminal session from key generation:
Country Name (2 letter code) [AU]:. State or Province Name (full name) [Some-State]:. Locality Name (eg, city) []:. Organization Name (eg, company) [Internet Widgits Pty Ltd]:mydomain Organizational Unit Name (eg, section) []:. Common Name (e.g. server FQDN or YOUR name) []:mydomain.com Email Address []:.
Here is what I have in /etc/apache2/sites-available/default-ssl :
<IfModule mod_ssl.c> <VirtualHost default:443> ServerAdmin webmaster@localhost ServerName mydomain.com:443 … # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on … SSLCertificateFile /etc/apache2/ssl/apache.crt SSLCertificateKeyFile /etc/apache2/ssl/apache.key
Here is what I have in /etc/apache2/httpd.conf
ServerName myhost.mydomain.com
Here is what I have in /etc/apache2/apache2.conf
ServerName localhost
Here is what I have in /etc/hosts
127.0.0.1 localhost myhost.mydomain.com
::1 ip6-localhost ip6-loopback myhost.mydomain.com fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
Here is what I have in /etc/sysconfig/network
HOSTNAME = myhost.mydomain.com
Then I did the following:
root@mydomain:~# a2dissite default-ssl Site default-ssl disabled. To activate the new configuration, you need to run: service apache2 reload root@mydomain:~# a2ensite default-ssl Enabling site default-ssl. To activate the new configuration, you need to run: service apache2 reload root@mydomain:~# service apache2 reload
When I go to mydomain.com on the browser, I still do not get HTTPS.
Can anyone help?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I had found out that it worked as per the first article. To see HTTPS, I need to type in “https://mydomain.com” into the browser, not just “mydomain.com”. Then HTTPS shows up, but Chrome is telling me that “The site’s security certificate is not trusted!..the server presented a certificate issued by an entity that is not trusted by your computer’s operating system. This may mean that the server has generated its own security credentials, which Google Chrome cannot rely on for identity information, or an attacker may be trying to intercept your communications. You should not proceed, especially if you have never seen this warning before for this site.” I clicked Proceed Anyway. I now see https://mydomain.com but the https has a horizontal cross-out line. <br> <br>Clicking on the lock shows “Identity not verified…Server’s certificate is not trusted… Your connection is encrypted with 256-bit encryption. The connection uses TLS 1.1. the connection is encrypted using CAMELLIA_256_CBC, with SHA1 for message authentication and DHE_RSA as the key exchange mechanism. The econnection does not use SSL compression.” <br> <br>If it is working as expected, then can someone explain to me the value of this SSL cert? I don’t understand why any developer would bother putting this on, even if it is free. No user is going to type in HTTPS://domain.com. Users are going to type only domain.com, which goes to HTTP://domain.com. Even if I redirect http to https, the URL looks awful with a red https with a line crossed over it.
<blockquote>No user is going to type in HTTPS://domain.com. Users are going to type only domain.com, which goes to HTTP://domain.com</blockquote>That’s how it works, you will have to redirect visitors from http to https otherwise they will have to type in https:// manually. <br><blockquote>the URL looks awful with a red https with a line crossed over it.</blockquote>That’s because the certificate is self-signed and not signed by a trusted certificate authority such as Comodo, GlobalSign, GoDaddy, Thawte, and many others. In order to get rid of the warning, you will need to send the CSR to a CA to sign and then replace the self-signed certificate with the signed one.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.