I am experiencing a strange problem regarding broken links to the CSS and image files.
On our website everything works as expected. If you type in a non existing UR
In my case, there were already location blocks in my conf file for the files suffering from broken links, the blocks just weren't configured properly.
Here's what I ended up with in my default.conf. For all URIs ending in "/sad.svg", it serves the file at the specified directory, ignoring any path earlier in the URI.
...
error_page 404 /404.html;
location = /404.html {
root /var/www/errors;
internal;
}
location ~* ".*/sad.svg" {
alias /var/www/errors/sad.svg;
access_log off;
}
location ~* ".*/twitter.svg" {
alias /var/www/errors/twitter.svg;
access_log off;
}
location ~* ".*/gitlab.svg" {
alias /var/www/errors/gitlab.svg;
access_log off;
}
...