The original post: /r/nginx by /u/Diff7666 on 2024-09-19 06:07:30.
Hello everyone, I'm learning about web development and very new to this. Recently, I wrote website based on flask application and tried to deploy it using Gunicorn and Nginx. Gunicorn is working, but I'm not sure about Nginx. When I visit my website through the domain, it works from mobile app browsers . But it gives me 403 error when visiting from laptop. When I run "curl" command, it also gives me 403 error. I tried following things.
- Removed firewalls from ports 80, 443
- Got SSL certificate from Let's Encrypt and included in the Nginx configuration
- Checked Nginx status and it's actively running.
- In the Nginx configuration file, I included both 80 and 443, directed towards the server where my Gunicorn is running, and provided path to the root directive of my website.
- Checked all the necessary file and directory permissions, and set them to www-data
- Also, I deleted sessions and cookies from my browsers, and flushed DNS.
Please let me know if you have anything that might work for this case.