The 404 plugin is not working with nginx here:
Error: "do" parameter missing
If i use the shell script for lighttpd, ikiwiki answers
Error: missing page parameter
Might this be a mistake by me or does anyone know a workaround to get the 404 plugin working with nginx? --?bacuh
The 404 plugin relies on environment variables set by Apache for 404 handlers. Not all web servers set the same variables (404 handlers aren't a standard feature) so it might need adapting to support nginx. (lighttpd has a similer problem - it doesn't indicate that the request was a 404 in an obvious way.)
If you temporarily set this (shell!) CGI script as your 404 handler, its output should indicate what variables nginx sets:
I checked the script's output and some nginx documentation. The only variable I could not find is $REDIRECT_URL. Also I could not discover any equivalent. Trying to define the variable myself in nginx's config does not help out.
Any ideas? (Should I provide env?)
REDIRECT_STATUS
(should be "404") andREDIRECT_URL
. I doubt it can be made to work if ngix does not provide the URL or some other indication of the page that is 404ing..I just have the following in my nginx config, which isn't as friendly, I think, as a 404 plugin, but it does the job:
This works fine for me with nginx: