How to set the apache configuration file to have nextcloud office to work

take a look at this working Apache config

provide the logs as per required support template.