I would move your Pi to Buster and use 7.3 of php.
Owncloud version 10.3 recommendation is Apache using php 7.3 as of May 2020.
There is a note in the forum that the current test build uses php 7.4
Going by the php change log 7.3.18 is the latest release for 7.3 and 7.2.31 for 7.2
If you do need a specific point release then the source code for releases ...
The very first warning:
sudo: unable to resolve host raspberrypi: Name or service not known
is typically shown with a missing entry in /etc/hosts for localhost names on Raspbian. The error messages from apache2 also indicate problems with local addresses. You should check your /etc/hosts file. Its default entry on Raspbian is: