Report this

What is the reason for this report?

I am using Ubuntu and Nginx findign that 404 errors are going to 500 errors

Posted on May 23, 2018

Here is my server block code

rewrite ^/home$ https://style-.com permanent;
        rewrite ^/index$ https://style.com permanent;

        location ~* \.(?:css|js|gif|jpeg|jpg|png)$ {
                expires max;
                add_header Cache-Control public;
        }

        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root /usr/share/nginx/html;
        }

This is working for a different website and I have looked everywhere online. If anyone has any ideas I would like to know.

I tried to look at the error logs in /var/log/nginx/error.log but there is nothing for the issue just some errors for other website.

I included rewrite rules at the top as this is a joomal website and those /home and /index url’s point to the same place so thats why I am redirecting them. I show them as this is custom code which I am not sure is giving an issue.

How can I be sure that it isn’t my actual site that is actually getting a 500 error and is unable to show the 404 page?

Thanks.

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.