config directory setup in index.php and 500 redirect for db error