server {
	root /var/www/public/;
	server_name keylighter.localhost;

	index index.php;

	location / {
		try_files $uri $uri/ /index.php?$args;
	}

	location /keylighter.css {
		try_files $uri $uri/ /index.php?$args;
	}

    location ~ ^/index\.php(/|$) {
        fastcgi_pass php:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;

        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;

        fastcgi_param APP_ENV "dev";
        fastcgi_param DATABASE_URL "sqlite:///%kernel.project_dir%/var/app.db";

        internal;
    }
}
