install.fairie/home/dot_local/etc/nginx/conf.d/http-status.conf

88 lines
4.6 KiB
Text
Raw Normal View History

2023-07-08 23:49:14 -07:00
map $status $status_text {
400 'Bad Request';
401 'Unauthorized';
402 'Payment Required';
403 'Forbidden';
404 'Not Found';
405 'Method Not Allowed';
406 'Not Acceptable';
407 'Proxy Authentication Required';
408 'Request Timeout';
409 'Conflict';
410 'Gone';
411 'Length Required';
412 'Precondition Failed';
413 'Payload Too Large';
414 'URI Too Long';
415 'Unsupported Media Type';
416 'Range Not Satisfiable';
417 'Expectation Failed';
418 'I\'m a teapot';
421 'Misdirected Request';
422 'Unprocessable Entity';
423 'Locked';
424 'Failed Dependency';
425 'Too Early';
426 'Upgrade Required';
428 'Precondition Required';
429 'Too Many Requests';
431 'Request Header Fields Too Large';
451 'Unavailable For Legal Reasons';
500 'Internal Server Error';
501 'Not Implemented';
502 'Bad Gateway';
503 'Service Unavailable';
504 'Gateway Timeout';
505 'HTTP Version Not Supported';
506 'Variant Also Negotiates';
507 'Insufficient Storage';
508 'Loop Detected';
510 'Not Extended';
511 'Network Authentication Required';
default 'Something is wrong';
}
map $status $status_message {
400 'Our server can not process the request due to an apparent client error.';
401 'Your browser must be authenticated to access this resource.';
402 'Something went wrong. Our server is unable to handle your request.';
403 'Your request was understood by the server but the server refused most likely due to permissions.';
404 'The resource you requested does not exist on our server.';
405 'The HTTP method you attempted to use is not allowed.';
406 'The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.';
407 'The client must first authenticate with the proxy.';
408 'The server timed out waiting for the request.';
409 'This error is an indicator that the request could not be processed because of conflict in the current state of the resource.';
410 'The resource you requested is no longer available and will not be available again.';
411 'The request did not specify the length of its content, which is required by the requested resource.';
412 'The server did not meet one of the preconditions that the requester put on the request header fields.';
413 'The request is larger than the server is willing or able to process.';
414 'The URI provided was too long for the server to process.';
415 'The request entity has a media type which this server does not support.';
416 'The client has asked for a portion of a file but the server cannot supply that portion.';
417 'The server cannot meet the requirements of the Expect request-header field.';
418 'I am a little teapot short and stout.';
421 'The request was directed at a server that is not able to produce a response.';
422 'The request was well-formed but was unable to be followed due to semantic errors.';
423 'The resource that is being accessed is locked.';
424 'The request failed because it depended on another request and that request failed.';
425 'This error indicates that the server is unwilling to risk processing the request since it might be replayed.';
426 'The client should switch to a different protocol.';
428 'The origin server requires the request to be conditional.';
429 'Too many requests in too short of a time span have been made.';
431 'The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.';
451 'For legal reasons, this resource cannot be accessed.';
500 'Woops! An error occurred.';
501 'The server either does not recognize the request method or it lacks the ability to fulfill the request.';
502 'The server was acting as a gateway or proxy and received an invalid response from the upstream server.';
503 'The server cannot handle the request because it is overloaded or down for maintenance. This is generally temporary.';
504 'The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.';
505 'The server does not support the HTTP protocol version used in the request.';
506 'Transparent content negotiation for the request results in a circular reference.';
507 'The server is unable to store the representation needed to complete the request.';
508 'The server detected an infinite loop while processing the request.';
510 'Further extensions to the request are required for the server to fulfill it.';
511 'The client needs to authenticate to gain network access.';
default 'Something went wrong. At the moment, our server is unable to complete your request.';
}