Getting 403 with www on domain and SSL certificate configuration

I set up django app following the next tutorial Django app

I configured all DNS records and it works fine.

I set up lets encrypt sertificate.

So, the problem is that certificate works fine on link with, but I get 403 forbidden. In the same time www) works fine, but it hasn’t SSL. How can I fix that?

Would be very grateful if somebody can help. Thanks.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi there @lavrikrom2,

It sounds like that your SSL Nginx Server block is not correct.

Can you share the content of both your Nginx Server Blocks for port 80 and 443 here so that I could advise you further on what the problem could be?

The two files are stored at the following folder:


Regards, Bobby