Question

Self signed Certificate nginx CentOS 6

I followed the following tutorial: https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-nginx-for-centos-6

I’m not getting any error message in my logs but the certificate isn’t working. I think it has to do with this file, which I needed to configure in the tutorial. I thought it was meant to be in the same place as the configuration for my python app.

This is /etc/nginx/conf.d/default.conf: https://i.imgur.com/0ch03r8.png

I set this file up for my python app while following a course on Udemy, I’m new to all this stuff and would love some help.

Thanks in advance, if you need anything else please ask!

Greetings,

Wouter van Acht.


Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

If you want the Python app to be available on HTTPS, you’ll also need to include the information you currently have in the first server block in the second one that has the SSL config.

Take a look at this more up-to-date tutorial for more information on creating a self-signed cert for use with Nginx:

You might also want to consider using Let’s Encrypt to generate your certificate. The project was not available at the time that tutorial was written. It greatly simplifies the process of generating and using SSL certs: