Can not load site without specifically open a php file

Steps to reproduce

1.fresh install of LAMP
2.installed latest 10.0.10 OC
3.try to open OC in firefox with just domain name

Expected behaviour

Install page should show

Actual behaviour

Php source code of index.php was shown instead.

After tried everything, I typed in https://domain.com/index.php and install wizard showed up.
After it finished, I can access the site with https://domain.com/index.php/index.php/app/
So basically, the site doesn’t work if I don’t specify a particular php file.

Server configuration

Operating system:
ubuntu 16.04
Web server:
apache2.4.18
Database:
mysqlnd 5.0.12
PHP version:
7.2
ownCloud version: (see ownCloud admin page)
10.0.10.4
Updated from an older ownCloud or fresh install:
fresh
Where did you install ownCloud from:
downloaded from owncloud
Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

"system": {
    "instanceid": "ocd6bhruscpk",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "domain.com"
    ],
    "datadirectory": "\/var\/www\/html\/owncloud\/data",
    "overwrite.cli.url": "https:\/\/domain.com",
    "dbtype": "mysql",
    "version": "10.0.10.4",
    "dbname": "owncloud",
    "dbhost": "localhost",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "logtimezone": "UTC",
    "installed": true
}

Update: I found the fix @ https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/index_php_less_urls.html
What’s missing in the config.php is this line:
‘htaccess.RewriteBase’ => ‘/’,

After updateing htaccess with occ, I reloaded the page with ctrl+R and everything is working finally.