Cannot get Lighttpd to work with Slim PHP (Solved)

I’m considering using Slim 3 for our upcoming API. We are currently using Lighttpd for the web interface, however, I have been unable to get the rewrite rule to work. The following is my config in lighttpd.conf:

$SERVER["socket"] == "" {
     ssl.engine                  = "enable"
     ssl.cipher-list             = "aRSA+HIGH !3DES +kEDH +kRSA !kSRP !kPSK"
     ssl.pemfile                 = "/mnt/kd/ssl/webinterface.pem"                 = "/mnt/kd/ssl/https_ca_chain.pem"
     server.document-root        = "/var/www/api/public"
     accesslog.filename          = "/var/log/lighttpd/ssl-access.log"
     url.rewrite-if-not-file     = ("^(.*)" => "/index.php/$0")
     url.access-deny             = ( "~", ".inc", ".htpasswd", ".htaccess" )
     dir-listing.activate        = "disable"

Accessing or works, though when I try it comes up with a 404 not found. The following is my index.php:

use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
require '/mnt/kd/phpmgr/vendor/autoload.php';
$app = new \Slim\App;
$app->get('/', function (Request $request, Response $response, array $args) {

$app->get('/hi', function (Request $request, Response $response, array $args) {

I forgot to add the "mod_rewrite" module to server.modules, fixed now…