Kirby 3 installation on Digital Ocean LAMP rewrite issue

I’m trying to deploy a Kirby 3 website using LAMP on Digital Ocean and running into issues getting it to work. The error is:

Under /var/www/html/kirby/src/Filesystem/Dir.php,

if (is_writable($parent) === false) {
            throw new Exception(sprintf('The directory "%s" cannot be created', $dir));
        }

I’m assuming it’s something with the directory not being rewritable. I’ve done the following to resolve the issue:

  1. followed everything from this topic: https://forum.getkirby.com/t/kirby-on-digitalocean-lamp-urls-doesn-t-work/2007 including enabling mod_rewire on Apache, and restarting the server.
  2. Installed PHP mbstring
  3. Double checked if the .htaccess file is working, as well as enabling RewriteEngine and setting RewriteBase /
  4. In apache.conf,
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

It’s running on Ubuntu 20.04 and php8.1. I’m a bit new to deploying on Digital Ocean and have used services such as Serverpilot without any issue, but would like to understand the hosting side of things a bit more in-depth.

Thank you for your help!

The error message has to do with permissions/ownership, not with Rewrite settings. Use chmod/chown to make the Apache user (www-data) the owner of the files/folders and make sure the permissions are set correctly.

Thanks so much @texnixe ! That worked. But I’m getting an issue with the panel installation, that says “The panel cannot be installed. The CURL extension is required”. I checked and curl version 7.68.0 is installed, do you know if it requires a different version?

Thank you!

Is that what phpinfo() says?

Ah, you’re right – I was installing the packages to the wrong version of php. All fixed now, thank you so much for your help!