Report this

What is the reason for this report?

Error 404 when I slugify my url NGINX

Posted on December 16, 2020

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!!



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!

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 @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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.