Question

Error 404 when I slugify my url NGINX

I was following this tutorial on how to deploy on digital ocean(Link) .Nginx is able to find all the urls other then the one which I had slugified(Website Link). I am able to load the website locally using gunicorn so I am guessing the issue is with NGINX.

Thank you for your help!!


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.

Hi there @tristanlimyj,

Can you share the exact Nginx server block configuration that you are using?

You need to make sure that you have the proxy_params file which contains the following proxy rules:

proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

I could suggest taking a look at this handy Nginx Config tool that let’s you generate your Nginx configuration:

https://www.digitalocean.com/community/tools/nginx

Regards, Bobby