Instead of the graphical installation wizard there is the php-code

Hi there,

I am trying to install nextcloud onto my server which runs ubuntu-server-16.04.

I have encoutered two problems in multiple installations. During one installation the mysql database did not wanted to work properly with nextcloud. During another installation, I saw the php-code instead of the graphical installation-wizard. Both times I followed the example-installation for nextcloud-12 step for step and did everything except the ‘pretty-url’ stuff.

Now I have again the problem that I see the php-code instead of the graphical installation-wizard when I visit http://<ip or domain>/nextcloud.

I am using the Apache Webserver 2.4.18 and this is my nextcloud.conf.

Alias /nextcloud "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

<IfModule mod_dav.c>
   Dav off

SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud


As I understand, the webroot under apache is /var/www/html/ so I threw it there and not to /var/www/

I hope I provided enough information.

I should really read more than twice my configs. I found the “errors” in the config above. I should have edited all occurences of /var/www/nextcloud to /var/www/html/nextcloud/

Now I have the problem with the database/admin user.

With the graphical installation-wizard, my browser tells me “too many redirects” and if I refresh, nothing happens “This page does not work”. Now I am trying use the command-line .

 sudo -u www-data php occ  maintenance:install \
--database "mysql" --database-name "nextcloud" \
--database-user "root" --database-pass "password" \
--admin-user "admin" --admin-pass "anotherPassword"

But if I execute this as root in /var/www/html/nextcloud/ I get the following error.

Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'

Why does that happen?