Nextcloud Installation Issue: Seeing index.php Instead of Nextcloud Setup Page

I’ve recently installed Apache2 and MariaDB on my server, set up a database and user for Nextcloud, and then installed Nextcloud by moving the files to /var/www/html/nextcloud/. After configuring the Apache2 virtual host, I was expecting to see the Nextcloud setup page when accessing the site, but instead, I see the raw index.php file displayed in my browser.

The index.php what i become when i try to set up nextcloud;

sudo nano /etc/apache2/sites-available/nextcloud.conf file :

systemctl status apache2.service :

/var/www/nextcloud (all nextcloud files are also available)

  • I tried to restart my server 2 times in a row and installed different versions of nextcloud.

Hi @yusufkace

Are all required and recommended Apache modules active?

a2enmod rewrite headers env dir mime

https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html#additional-apache-configurations

It may also be helpful to align the directory section in your configuration with that in the official documentation, specifically by adding/extending the following two lines:

Require all granted
Options FollowSymLinks MultiViews

https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html#apache-web-server-configuration

Hello @bb77 thanks for your answer. :slight_smile:

I checked if the Apache modules are active, and yes they are active.

And i add the two lines on the Apache configuration file.

When i try to set up nextcloud via opening the server of mine i become same screen.

Do you have any other suggestions?

Regards

Maybe a missing PHP module…

https://docs.nextcloud.com/server/latest/admin_manual/installation/php_configuration.html

Hello @bb77 i changed some config files and now i am getting now

“This version of Nextcloud requires at least PHP 8.0
You are currently running 7.4.33. Please update your PHP version.”

Bildschirmfoto 2024-12-06 um 17.28.08

I must find a way to update the php of my server which is not really easy to find. (I tried it earlier) :smiley:

If you are on Debian or Ubuntu, you could upgrade your system to the latest release, Debian 12 or Ubuntu 24.04, which ship with PHP 8.2 or 8.3 respectively. Or, if you can’t upgrade your distribution for some reason, you could try the following script: Php-updater - a script to upgrade php in a safe way

1 Like

The issue was that i tried to install on Debian os but then I was not able to install PHP latest version so I installed again on Ubuntu and problem solved :slightly_smiling_face:

I solved it instead of installing on Debian i just installed on Ubuntu and problem solved thanks for your help :slightly_smiling_face:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.