Hey everyone!
I've been searching for a while for a way to have a map with the response code ("$status" variable) and a title and a description as values, so that I can have a map with all reponse codes (400, 401, [..], 500, 501, etc) and use it in a static page (with SSI active) where I would do something like:
<h1><!--# echo var="status" default="" --> <!--# echo var="st
atus_title" default="Something is wrong" --></h1>
<p align="center"><!--# echo var=""status_desc" default="" --></p>
Currently I have two maps, as follows:
map $status $status_title {
400 'Bad Request';
401 'Unauthorized';
[..]
}
map $status $status_desc {
400 'The server cannot or will not process the request due to something that is perceived to be a client error.';
401 'The client must authenticate itself to get the requested response.';
[..]
}
This is not working, although I get no error when checking the syntax with "nginx -t". How could I combine these two maps into one so that I could get a custom error code, error title and error description in my error page?
Thanks in advance.
--
Ubi sapientas ibi libertas