title: Install SSL Certificate on NGINX / Ubuntu 16.04 x64 (Digital Ocean)
body: <p>I have been trying to install the SSL certificate on my droplet on Digital Ocean. This droplet is running NGINX / Ubuntu 16.04 x64.</p>
  
  <p>I don't have any cPanel just a terminal with SSH connection.</p>
  
  <p>I have also talked to the Digital Ocean's support guy and he shared 2 tutorials with me which I have tried. But following those tutorials end up breaking my site.</p>
  
  <p><strong><a href="https://www.digitalocean.com/community/tutorials/how-to-install-an-ssl-certificate-from-a-commercial-certificate-authority#install-certificate-on-web-server" rel="nofollow noreferrer">Tutorial 1</a></strong></p>
  
  <p><strong><a href="https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-nginx-for-ubuntu-14-04#step-two-%E2%80%94-configure-nginx-to-use-ssl" rel="nofollow noreferrer">Tutorial 2</a></strong></p>
  
  <p>I have edit the <strong>/etc/nginx/nginx.conf</strong> and added the server block like this in <code>http</code> block:</p>
  
  <pre><code>server {
           listen 443 ssl;
           server_name www.example.com;
           ssl_certificate /home/user/example/www.example.com.crt;
           ssl_certificate_key /home/user/example/www.example.com.key;
  }
  </code></pre>
  
  <p>What I'm doing wrong and what is the right way? </p>
  
  <p>I'm confused which file to edit. </p>
  
  <p>I have:</p>
  
  <p>1) /etc/ngix/ngix.conf</p>
  
  <p>2) /etc/nginx/sites-available/default</p>
  
  <p>3) /etc/nginx/sites-available/defaultu</p>
  
  <p>4) /etc/nginx/sites-available/example.com</p>
  
  <p>5) /etc/nginx/sites-enabled/example.com</p>
  
  <p>Please I need help...</p>