Cohan

Stuff and things

Set up in nginx, but my Forge-hosted static site still isn't showing my 404 page

2022-01-18 1 min read

I’ve set up the 404.html to load but it still isn’t loading. Anyway this fixes it ->

Click the server, click the site, click the edit files and edit nginx configuration.

In there scroll to

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

Chuck a =404 on the end there and it’ll start working

    location / {
        try_files $uri $uri/ /index.php?$query_string =404;
    }

Sorted.

Oh wait, restart nginx too.

Sorted.