Nexcloud does not start after Installation but download a file instead

System: V-Server Strato, OS: ‪Ubuntu 16.04.3 LTS‬ mit Plesk Onyx Version 17.5.3 , PHP Version 7.1.12, apache (no NGINX)

I produced a symlink ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
and the the file nextcloud.conf for the site-enabled. All nextcloud files resides in the diretory nextcloud in the docroot of apache2. Owner and group of all dir/files of nextcloud are set to www-data.

After server restart and trying to open Nextcloud by https://server/nextcloud only a file with the the following (shortened content) gets downloaded:

<?php /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Jörn Friedrich Dreyer * @author Lukas Reschke * @author Morris Jobke * @author Robin Appelman * @author Thomas Müller * @author Vincent Petry * * @license AGPL-3.0 * ... ... ... //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } catch (Error $ex) { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Obviously php does not work. Any idea what is going wrong here?

On ubuntu 16.04 repo php 7.1 seems to be not available. Are you sure that you have installed the same php version for all related packages, especially mod-php respectively php-fpm?

Any hints in webserver log /var/log/apache2/error.log?

I use Plesk onyx to manage the server. Here I can choose which php-Version I would like to install and use. 7.1 is installed and used for all domains. Apache2 log reports only one error: python_init: Python version mismatch, expected ‘2.7.6’, found ‘2.7.12’. Could this harm the start of nextcloud? (By the way, do you know how to tell apache the new version?)

to get details about php create a file with the following content:

<?php phpinfo();

(you can omit the lines with opache) and save it as info.php (or anyname.php) somewhere in your webroot. if you open it with a browser you get all the php-info.
also, if you do not run python-applications under apache you can probably disable the corresponding module. if you do, get the python-modules to the same version as the rest of your python-environment.

Thank you Pete! I have done this and found running this file on the root level in a bash it brings up php version 7.0 but moving it in the domains and open it there with a browser it shows php version 7.1 (what I have selected for the domains. May I post the link to the phpinfo that you check whether something is missing or misconfiguered on the domain-side?

some distros allow different versions of php to coexist but ubuntu is probably not one of them. you should check your apt sources and make sure all the php-stuff (apache-php-modules etc.) has the same version. is there a reason you need php 7.1? on my debian 7.0.19-1 runs just fine.
if you want the php-version from a shell you can just run php -v - the info-thingie was intended for apache.
what’s in your nextcloud.conf for apache? if php gets interpreted correctly elsewhere then maybe there is an error there.