MoinMoin with NGINX and uWSGI
I’ve been moving much of my web infrastructure away from Apache and toward NGINX and uWSGI. Goal: Ditch PHP like the bad habit it is and improve performance of my webapps. (Yes, I know I said that on a Wordpress, PHP based blog.)
MoinMoin is my wiki engine of choice. It works very well under this setup and figuring that out was only a couple Google searches. However, I could not attach files to my wiki pages under NGINX and uWSGI. I kept getting the message:
“No file content. Delete non ASCII characters from the file name and try again.”
No other error messages, and my log files indicated nothing out of the
ordinary. I tracked this down in the MoinMoin code and discovered that
this was the error produced when it checked the HTTP request object for
the uploaded file content. That content was the python special value
None
.
Turns out, this seems related to NGINX’s support of sendfile
. (Which
improves performance of reading and writing from one file descriptor to
another.) I turned off sendfile
support in /etc/nginx/nginx.conf
and attaching files to wiki pages started to work
Now to figure out why that is.