add nginx support;
improve error output;
add debug output for index.php;