Problems fixing a REST API 404 after Moving my WordPress Directory and updating Permalink Structure

This sounds like it might be an issue with how the files for the main Apache2 configuration file and those found in the virtual host are written.

Adding the following line to the file * /etc/apache2/sites-available/hostname-le-ssl.conf before

<Directory /var/www/html/hostname/public_html/>
AllowOverride All

Then restart apache2.

$ sudo systemctl restart apache2

The files in /etc/apache2/sites-available are symlinked to /etc/apache2/sites-enabled.

ls -l /etc/apache2/sites-enabled/hostname-le-ssl.conf

lrwxrwxrwx 1 root root 65 May 26 2019 /etc/apache2/sites-enabled/hostname-le-ssl.conf -> /etc/apache2/sites-available/hostname-le-ssl.conf