title: How to remove the self-signed SSL certificate created in AWS ubuntu server
body: <p>Hi I have deployed a simple flask python web in the AWS ubuntu server, followed this guys' e-book(<a href="https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-vii-error-handling" rel="nofollow noreferrer">https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-vii-error-handling</a>). But I found there is issue, when I want to access the web by the browser. 
  When I accessed the site in the chrome browser, there is security warning as shown in the figure. Although I can click the 'processed to...' to access successfully the site. </p>
  
  <p><a href="https://i.stack.imgur.com/3KADc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3KADc.png" alt="issue"></a></p>
  
  <p>But I don't want the warning image is shown when accessing the site.</p>
  
  <p>I found that this issued is caused by the self-signed SSL certificate in AWS ubuntu server. The command for creating SSL certificate is following:</p>
  
  <pre><code> ￼￼￼$ mkdir certs
   $ openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
    -keyout certs/key.pem -out certs/cert.pem
  </code></pre>
  
  <p>And the Nginx configuration is following, I want to delete or comment out the ssl_certificate part, and reload it. But I found that I can't access the site.
  After I added ssl_certificate part, and it works. But there is still warning pages.
  How to deal with this issue.</p>
  
  <pre><code>    server {
      # listen on port 443 (https)
      listen 443 ssl;
      server_name _;
      # location of the self-signed SSL certificate
      ssl_certificate /home/ubuntu/microblog2/certs/cert.pem;
      ssl_certificate_key /home/ubuntu/microblog2/certs/key.pem;
  
      location / {
          # forward application requests to the gunicorn server
          proxy_pass http://127.0.0.1:8000;
          proxy_redirect off;
          proxy_set_header Host \$host;
          proxy_set_header X-Real-IP \$remote_addr;
          proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
  }
      location /static {
          # handle static files directly, without forwarding to the application
          alias /home/ubuntu/microblog2/static;
          expires 30d;
  } }
  </code></pre>