Removing index.php with mod_rewrite w/Plesk on Debian 9

Nextcloud version 17.0.1:
Operating system and version: Debian 9
Apache or nginx version: Apache 2.4.25
PHP version: 7.3.12
Installed with Plesk Obsidian

The issue you are facing:
In my attempt to remove index.php from my urls, I realized I am unable to run any OCC commands. The www-data user is ranapup and these are the commands I’ve tried from the appropriate vhosts folder where nextcloud is located.

input: sudo -u ranapup occ maintenance:update:htaccess
output: do: occ: command not found

input: sudo -u php ranapup occ maintenance:update:htaccess
output: sudo: php: command not found

I even tried just running occ with no luck. I didn’t paste all the logs because I feel they’re irrelevant. If needed, I will do so. I feel this is a dumb issue I’m missing somewhere and it’s probably related to Plesk.

Note: This is a dedicated server and I have full root access.

The occ command can usually be found in the Nextcloud document root. Please show the output of ls -al <full-path-to-nextcloud-document-root>/occ .