Cannot access nextcloud from lan nor web after install

Hi everyone.
This is my first install of NC. It is installed on an Helios64 using apache2. Everything was alright (I got the message “Nextcloud was successfully installed” but I cannot access NC at all. I can reach the Apache default page but when I try serverip/nextcloud I got “Internal server error”. In apache2/sites-available I have two files:

  • nextcloud.conf:

DocumentRoot /media/nextcloud

ServerName localip

ErrorLog ${APACHE_LOG_DIR}/error.log

CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /media/nextcloud/>

Options +FollowSymlinks

AllowOverride All

<IfModule mod_dav.c>

Dav off

</IfModule>

SetEnv HOME /media/nextcloud

SetEnv HTTP_HOME /media/nextcloud

Satisfy Any

</Directory>

</VirtualHost>
  • my.subdomain.conf

 DocumentRoot /media/nextcloud
 ServerName mysubdomain

 Alias /nextcloud “/media/nextcloud/”

 <Directory /medianextcloud>
  Options +FollowSymlinks
  AllowOverride All

  <IfModule mod_dav.c>
   Dav off
  </IfModule>

  SetEnv HOME /media/nextcloud
  SetEnv HTTP_HOME /media/nextcloud
 </Directory>

 ErrorLog /var/log/apache2/nextcloud-error_log
 CustomLog /var/log/apache2/nextcloud-access_log common

</VirtualHost>

In /media/nextcloud/config/config.php I have (among other things):

'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'subdomain name',
    2 => 'local ip',
  ),

If you have any idea about what’s going please tell me :slight_smile:
Thank you for your time!

Hello @Sarek ,

welcome to the community of Nextcloud.

This sounds like a webserver issue. Please check your apache logs and you will find the cause.

Thanks for the answer @rakekniven.
I checked the logs and there is no error in them.
The end of access.log is:

mypcip - - [14/Mar/2021:13:00:38 +0100] "GET /nextcloud HTTP/1.1" 500 477 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 OPR/73.0.3856.415"
mypcip - - [14/Mar/2021:13:00:39 +0100] "GET /nextcloud HTTP/1.1" 500 477 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 OPR/73.0.3856.415"

The end of error.log is:

[Sun Mar 14 12:58:10.431315 2021] [mpm_prefork:notice] [pid 1311] AH00163: Apache/2.4.38 (Debian) configured -- resuming normal operations
[Sun Mar 14 12:58:10.431597 2021] [core:notice] [pid 1311] AH00094: Command line: '/usr/sbin/apache2'

I have two other files: nextcloud-access_log and nextcloud-error_log which are empty.

If you would have used the search function of the forum, you had seen that this kind of error appears very ofter because users have forgotten to install a required php module.
Check the content of the nextcloud.log file to find further details about the root cause of the problem.

Of course I have checked the solutions proposed on the other issues. But I was not able to solve my issue. By the way, I don’t have any nextcloud.log in /var/log.

The Nextcloud log file ist by default stored in the data directory, except you’ve configured a different path in your config.php file. Check-out the adminstrator guide for further details

https://docs.nextcloud.com/server/21/admin_manual/configuration_server/config_sample_php_parameters.html?highlight=log%20file#logging

No sure, if this is it - But anybody noticed that typo yet…? :wink:

@jotoeri Thanks, I correted the typo.
@j-ed , Thanks, I have found the log file but I do not understand a bit of its content. I can see there are 2 problems: here is the beginning and the end of the of the two errors:

"reqId":"Sy9RnnpFkkmUSbqbte8r","level":3,"time":"2021-03-14T09:52:17+00:00","remoteAddr":"","user":"admin","app":"no app in context","method":"","url":"--","message":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve trashManager! Class trashManager does not exist","Code":0,"Trace":
...
{"file":"/media/nextcloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->","args":[]},{"file":"/media/nextcloud/occ","line":11,"args":["/media/nextcloud/console.php"],"function":"require_once"}],"File":"/media/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":115,"CustomMessage":"Could not boot files_trashbinCould not resolve trashManager! Class trashManager does not exist"},"userAgent":"--","version":"21.0.0.18"}

and

"reqId":"Sy9RnnpFkkmUSbqbte8r","level":3,"time":"2021-03-14T09:52:17+00:00","remoteAddr":"","user":"admin","app":"no app in context","method":"","url":"--","message":{"Exception":"OCP\\AppFramework\\QueryException","Message":"Could not resolve OCA\\Files_Versions\\Versions\\IVersionManager! Class can not be instantiated","Code":0,"Trace":
...
"File":"/media/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","Line":111,"CustomMessage":"Could not boot files_versionsCould not resolve OCA\\Files_Versions\\Versions\\IVersionManager! Class can not be instantiated"},"userAgent":"--","version":"21.0.0.18"}