0

I'm trying to configure SSL for my Apache2 server (Ubuntu14). At the end, my browser returns: "The security certificate presented by this website was not issued by a trusted certificate authority."

Here there are the steps:

1)

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2 openssl
sudo a2enmod ssl
service apache2 restart
sudo mkdir /etc/apache2/ssl
sudo openssl req -new -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.csr

2) Sent the code to my company CA: Intranet Server Private CA (UTF-8) and they sent me 3 files:

  • MyCompanyPrivateCA.cer [binary]
  • MyCompanyPrivateCA.base64.cer [contains -----BEGIN CERTIFICATE-----]
  • AltriServer.125642.cer [contains -----BEGIN CERTIFICATE-----]

3) sudo nano etc/apache2/sites-available/default-ssl.conf

<IfModule mod_ssl.c>
         <VirtualHost _default_:443>
                 ServerAdmin myemail@mycompany.it
                 ServerName <mywebsite>
                 ServerAlias www.<mywebsite>
                 DocumentRoot /var/www/html
                 ErrorLog ${APACHE_LOG_DIR}/error.log
                 CustomLog ${APACHE_LOG_DIR}/access.log combined
                 SSLEngine on
                 SSLCertificateFile      /etc/apache2/ssl/AltriServer.125642.cer
                 SSLCertificateKeyFile /etc/apache2/ssl/apache.key
                 SSLCACertificateFile /etc/apache2/ssl/MyCompanyPrivateCA.base64.cer
                 <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                 SSLOptions +StdEnvVars
                 </FilesMatch>
                 <Directory /usr/lib/cgi-bin>
                                 SSLOptions +StdEnvVars
                 </Directory> 
                 BrowserMatch "MSIE [2-6]" \
                                 nokeepalive ssl-unclean-shutdown \
                                 downgrade-1.0 force-response-1.0
                 # MSIE 7 and newer should be able to use keepalive
                 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
         </VirtualHost>
 </IfModule>

4) sudo a2ensite default-ssl.conf

5) sudo service apache2 restart

The result is that in chrome https world in the URL is red.

Could someone help me? Riccardo

frasertweedale
  • 4,801
  • 3
  • 22
  • 36
Riccardo79
  • 778
  • 3
  • 14
  • 25

1 Answers1

0

I'm not see errors in your config.

It's not an error its a warning, the certificate you generated is not trusted only by the browser.

If this is not production server, just manually trust your certificate in browser and ignore this message.

Also, please take a look - Getting Chrome to accept self-signed localhost certificate

There is few solutions for Chrome tuning.

Community
  • 1
  • 1
mrDinkelman
  • 450
  • 1
  • 10
  • 16