I have a simple static site generated with Jekyll that I'm using an Nginx server to host. The site is in two languages but that is currently only done with different versions of pages being at different URLs. It doesn't currently do anything with the accept-language header. I thought it would be nice to be able to at least set the 404 page based on language as it is only currently in English.
I'm not very familiar with Nginx configuration and my current configuration is very simple:
error_page 404 /404.html;
location ~* ^(.+)/$ {
try_files $uri /$1/index.html /$1.html =404;
}
The alternative language 404 page would just be another static file, e.g. /404-ca.html