I was struggling with this for a while.
If you're following the OP guide, you must also:
- In your aaPanel, uncheck:
Website > example.com > site directory > "Anti-XSS attack (Base directory limit(open_basedir)
- Set permissions to aaPanel user by running this command in your server terminal:
sudo chown -R www:www /your/path/to/flarum
Other than that, tutorial worked for me.