title: Ubuntu openssl created Certificate giving "Not Secure Connection" in browsers
body: <p>I'm trying to launch a website on <code>Google Cloud Compute Engine VM Instance (Ubuntu 18.04 LTS)</code> which will run through <code>example.com (using for Stackoverflow Question)</code>. I wish to use my own <code>SSL</code> certificate, which I created through the inbuilt Ubuntu command: </p>
  
  <p><code>sudo openssl req -x509 -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/https.key -out /etc/apache2/ssl/https.crt</code></p>
  
  <p>and I have also altered the <code>000-default.conf</code> file:</p>
  
  <pre><code>&lt;Directory /var/www/html&gt;
          Options FollowSymLinks
          AllowOverride All
          Order Allow,deny
          Allow from all
  &lt;/Directory&gt;
  &lt;VirtualHost *:80&gt;
          ServerName example.com
          ServerAlias example.com
          Redirect / https://www.example.com/
  &lt;/VirtualHost&gt;
  &lt;VirtualHost *:443&gt;
          ServerName example.com
          ServerAlias www.example.com
  
          ServerAdmin webmaster@localhost
          DocumentRoot /var/www/html
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  
          SSLEngine On
          SSLCertificateFile /etc/apache2/ssl/https.crt
          SSLCertificateKeyFile /etc/apache2/ssl/https.key
  &lt;/VirtualHost&gt;
  # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  </code></pre>
  
  <p>So with this method and settings, whenever I run <code>https://www.example.com</code> on Google Chrome, it keeps saying <code>Not Secure</code> with <code>https</code> being crossed with red line.
  I bought the <code>example.com</code> from <code>Godaddy.com</code> and I think I'm not able to insert the correct DNS Settings. So far I have only inserted <code>(Type = A, Host = @, Points to = MY_IP_ADDRESS, TTL = 1 hour)</code>. I'm not sure how to fix this and I cannot find any information online how to fix this so I need some help. Thanks.</p>