You are not logged in.

#1 2021-04-30 17:10:17

fow0ryl
Member
Registered: 2021-04-30
Posts: 1

Nextcloud Internal Server Error

Hello,

I can't get nextcloud work anymore. Have read the wiki again and again. But there are so many things remaining unclear.
I'm trying to setup nextcloud with apache, php-fpm and postgresql.
Maybe its a problem of my bad english ...

After updating to nextcloud 21.0.1 I changed the owner my data and config directory

# chown -R nextcloud:nextcloud /data/nextcloud/ 
# chown -R nextcloud:nextcloud /etc/webapps/nextcloud/config/

The /etc/php/php-fpm.conf contains only a few lines ...

[global]
error_log = syslog
include=/etc/php/php-fpm.d/*.conf

My /etc/php/phg-fpm.d/nextcloud.conf contains this:

[nextcloud]
user = nextcloud
group = nextcloud
listen = /run/nextcloud/nextcloud.sock
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp

; should be accessible by your web server
listen.owner = http
listen.group = http

pm = dynamic
pm.max_children = 15
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

The php-fpm service is updated too.

### Editing /etc/systemd/system/php-fpm.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Service]

ReadWritePaths=/usr/share/webapps/nextcloud/config/
ReadWritePaths=/etc/webapps/nextcloud/
ReadWritePaths=/data/nextcloud/
ReadWritePaths=/usr/share/webapps/nextcloud/
ReadWritePaths=/usr/share/webapps/nextcloud/wapps/

### Lines below this comment will be discarded

My /etc/httpd/conf/extra/http-nextcloud.conf is this:

<IfModule mod_alias.c>
    Alias /nextcloud /usr/share/webapps/nextcloud/
</IfModule>

<Directory /usr/share/webapps/nextcloud>
    Options FollowSymlinks
    AllowOverride ALL
    Require all granted
	DirectoryIndex index.php index.html
	<FilesMatch \.php$>
		SetHandler "proxy:unix:/run/nextcloud/nextcloud.sock|fcgi://localhost/"
	</FilesMatch>
</Directory>

<VirtualHost *:80>
    ServerAdmin foo@mydom.xa
    DocumentRoot /usr/share/webapps/nextcloud
    ServerName nextcloud.mydom.xa
    ErrorLog /var/log/httpd/nextcloud.info-error_log
    CustomLog /var/log/httpd/nextcloud.info-access_log common
</VirtualHost>

After restarting php-fpm and httpd I get an error message

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

In /var/log/http I found this:

# cat access_log 
::1 - - [30/Apr/2021:19:02:25 +0200] "GET /nextcloud/status.php HTTP/1.1" 500 -
127.0.0.1 - - [30/Apr/2021:19:02:34 +0200] "GET /nextcloud/ HTTP/1.1" 500 289
# cat error_log 
[Fri Apr 30 19:02:23.416681 2021] [ssl:warn] [pid 43434:tid 139732082326848] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Apr 30 19:02:23.416766 2021] [ssl:warn] [pid 43434:tid 139732082326848] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 30 19:02:23.441627 2021] [ssl:warn] [pid 43434:tid 139732082326848] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Fri Apr 30 19:02:23.441664 2021] [ssl:warn] [pid 43434:tid 139732082326848] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 30 19:02:23.443656 2021] [mpm_event:notice] [pid 43434:tid 139732082326848] AH00489: Apache/2.4.46 (Unix) OpenSSL/1.1.1k configured -- resuming normal operations
[Fri Apr 30 19:02:23.443690 2021] [core:notice] [pid 43434:tid 139732082326848] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'

But no hint what is going wrong.

Here is my nextcloud config.php

# cat config.php 
<?php
$CONFIG = array (
  'config_is_read_only' => true,
  'datadirectory' => '/data/nextcloud/',
  'loglevel' => 0,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'apps_paths' =>  array (
        0 =>  array (
                  'path' => '/usr/share/webapps/nextcloud/wapps',
                  'url' => '/wapps',
                  'writable' => true,
        ),
        1 =>  array (
                   'path' => '/usr/share/webapps/nextcloud/apps',
                   'url' => '/apps',
                   'writable' => false,
        ),
  ),
  'instanceid' => 'ociv1f1j5gwk',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' =>  array (
        0 => 'localhost',
        1 => '192.168.200.100',
        2 => 'Falcon',
  ),
  'dbtype' => 'pgsql',
  'overwrite.cli.url' => 'http://localhost/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'XXX',
  'installed' => true,
  'version' => '21.0.1.1',
  'maintenance' => false,
  'theme' => '',
  'default_language' => 'de',
  'default_locale' => 'de_DE',
  'trashbin_retention_obligation' => 'auto, 7',
  'updater.release.channel' => 'stable',
  'app_install_overwrite' =>  array (
       0 => 'emlviewer',
       1 => 'files_fulltextsearch',
       2 => 'fulltextsearch_elasticsearch',
       3 => 'fulltextsearch',
       4 => 'files_fulltextsearch_tesseract',
       5 => 'calendar',
  ),
);

Can anbody help?

Offline

#2 2021-05-02 07:07:36

Ttz_ztT
Member
Registered: 2015-10-03
Posts: 17

Re: Nextcloud Internal Server Error

Hi,

why is there www.example.com:443:0 in error.log ?
Check if the entries in other config files match the certificate/domain combination that you really want (/etc/httpd/conf/extra/httpd-ssl.conf i.e.).
Does it work if you try to use http (without redirection)?

I can't see any other errors in your config, tho.

Offline

Board footer

Powered by FluxBB