Mindtouch 400 Bad Request / Response Status Code: 0

In case you receive a 400 Bad Request when creating new Mindtouch Wiki Pages or your API won't load at all and returns HTTP Response Status Code: 0, it is most certainly a permissions problem on your server infrastructure.

Make sure the group under which your Web server runs, has write permissions to the cache directory of Mindtouch.

 

sudo chmod 775 -R /var/www/html/dekiwiki/bin/cache/luceneindex/

If that doesn't help you might want to tweak the mod_rewrite settings in your apache configuration. Just add deki to the mod rewrites, this could solve issues you might experience when using Mindtouch with SSL, for instance if the WYSIWYG ckEditor 3.0 doesn't load.
 

RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|deki)/

You can also empty the cache in the backend of Mindtouch to work around issues. Also give the Wiki's error log file a visit to pinpoint the root cause.
 

tail -n 20 /var/log/dekiwiki/deki-api.log

That's it for now, but I might extend this troubleshooting document at a later date.

In case you enjoyed this tutorial, please leave a comment below - every comment enlightens my day.