Navigating to, for example, https://example.org/apps/files brings me to the files app, but any links from inside nextcloud still include /index.php/, ie https://example.org/index.php/apps/files.
$ doas -u www ./occ maintenance:update:htaccess
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see
http://php.net/manual/en/book.pcntl.php
.htaccess has been updated
The behaviour is the same after running the command.