Question

How to create custom error (CGI or HTML) using uWSGI application server?

Example configuration taken from https://softwarerecs.stackexchange.com/a/3951/2719

How to execute a CGI script (or just a HTML file if not possible) when user visited link that doesn't exists, instead of just Not Found page?

Was it helpful?

Solution

use the internal routing subsystem:

error-route-status = 404 static:yourfile.html

or

error-route-status = 404 cgi:yourscript.foo

http://uwsgi-docs.readthedocs.org/en/latest/InternalRouting.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top