Installation kann nicht abgeschlossen werden

Hallo Zusammen,

seit Freitag versuche ich nextcloud 22 auf folgendem System zu installieren:

Proxmox 6.3-2
Debian 11 in einer VM
PHP 8
nginx 1.21.4
inkl. Pi-hole & nginx proxy manager

Leider scheitere ich aktuell beim Abschluss der Installation. Bedeutet, wenn ich die lokale IP-Adresse aufrufe um die Installation abzuschließen, kommt die nginx-Startseite. Ich bin mir 100% sicher, dass das Problem vor dem Rechner sitzt :thinking:. Jedoch finde ich den Fehler nicht. Die Anleitung habe ich quer aus dem Internet zusammen kopiert. Daher füge ich die Befehle diesem Thread an.

Laut dem Error.log von nginx tritt der Fehler “worker process 2279 exited with code 0” auf

Ich hoffe, dass Ihr mir weiterhelfen könnt.

Vielen Dank und Gruß,

Michael

timedatectl set-timezone Europe/Berlin
apt-get update && apt-get upgrade && apt-get autoremove 
apt-get install gnupg2 lsb-release ca-certificates
------- Nginx:
wget -O - http://nginx.org/keys/nginx_signing.key | apt-key add -
cd /etc/apt/sources.list.d/
echo "deb http://nginx.org/packages/mainline/debian $(lsb_release -cs) nginx" | tee /etc/apt/sources.list.d/nginx.list
	-> deb http://nginx.org/packages/mainline/debian bullseye nginx
apt update && apt install nginx
nginx -v
systemctl status nginx.service
systemctl start nginx.service
systemctl enable nginx.service
systemctl status nginx.service
--> systemctl --type=service --> Listet alle Programme auf, welche aktuell laufen
-> Firefox: YOURSERVERIP --> Anzeigen der Nginx-Version

------- PHP:
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
	->  deb https://packages.sury.org/php/ bullseye main
apt-get update && apt-get upgrade
apt install php8.0-fpm php8.0-common php8.0-mysql php8.0-gmp php8.0-curl php8.0-intl php8.0-mbstring php8.0-xmlrpc php8.0-gd php8.0-xml php8.0-cli php8.0-zip php8.0-soap php8.0-imap
nano /etc/php/8.0/fpm/php.ini
	-> memory_limit = 256
--> systemctl --type=service --> Listet alle Programme auf, welche aktuell laufen
systemctl status php8.0-fpm.service
systemctl enable php8.0-fpm.service

=========== Nextcloud settings =================================
apt-get install php8.0-imagick  php8.0-bz2  php8.0-pgsql php8.0-dev redis-server php8.0-redis php8.0-smbclient php8.0-ldap php8.0-bcmath libmagickcore-6.q16-6-extra
=========== Nextcloud settings =================================

------- Nginx mit PHP konfigurieren:
usermod -a -G www-data nginx
mkdir /var/www

nano /var/www/phpinfo.php
============== Code - Anfang ==================
<?php
phpinfo();
?>
============== Code - Ende ==================

cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf_bak
rm /etc/nginx/conf.d/default.conf && nano /etc/nginx/conf.d/default.conf
nano /etc/nginx/conf.d/default.conf
============== Code - Anfang ==================
server {
    listen       80;
    server_name  localhost;

    root   /var/www;
    index  index.php index.html index.htm;

   location / {
    if ($request_uri ~ ^/(.*)\.html$) {
        return 302 /$1;
        }
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /var/www;
    }
        location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass   unix:/var/run/php/php8.0-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

}
============== Code - Ende ==================
chown -R www-data:www-data /var/www/
find /var/www -type d -exec chmod g+s {} +    --> Danach setzen wir für den Ordner das sogenannte setgit-Bit. Neu angelegte Dateien und Verzeichnisse haben dann automatisch www-data als Gruppe:
sudo nginx -t 
systemctl restart nginx.service
systemctl restart php8.0-fpm.service
-> Firefox: YOURSERVERIP/phpinfo.php --> Anzeigen PHP-Version

------- PostgreSQL:
echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt update && apt install postgresql php-pgsql
sudo -u postgres psql
============== Code - Anfang ==================
CREATE USER db_user WITH PASSWORD 'MeIn_pAsSw0rD';
CREATE DATABASE nextcloud_db TEMPLATE template0 ENCODING 'UNICODE';
ALTER DATABASE nextcloud_db OWNER TO db_user;
GRANT ALL PRIVILEGES ON DATABASE nextcloud_db TO db_user;
\q --> Beenden der Einstellungen und Schließen PostgreSQL
============== Code - Ende ==================

=========== Nginx & PHP settings =================================

nano /etc/nginx/nginx.conf
============== Code - Anfang ==================
user: nginx
worker_processes: auto
server_tokens: off
============== Code - Ende ==================

cp /etc/php/8.0/fpm/pool.d/www.conf /etc/php/8.0/fpm/pool.d/www.conf_bak
nano /etc/php/8.0/fpm/pool.d/www.conf
============== Code - Anfang ==================
user = www-data
group = www-data
listen = /run/php/php8.0-fpm.sock --> 8.0 muss nach der jeweiligen PHP-Version angepasst werden
STRG + W -> Pass environment variables like LD_LIBRARY_PATH. ALL $VARIABLES und auskommentieren
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
============== Code - Ende ==================

cp /etc/php/8.0/fpm/php.ini /etc/php/8.0/fpm/php.ini_bak
nano /etc/php/8.0/fpm/php.ini
============== Code - Anfang ==================
cgi.fix_pathinfo = 0
memory_limit = 1024M -> mindestens 512M
opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 128
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 10000
opcache.revalidate_freq = 1
opcache.save_comments = 1
============== Code - Ende ==================

cp /etc/php/8.0/cli/php.ini /etc/php/8.0/cli/php.ini_bak
nano /etc/php/8.0/cli/php.ini
============== Code - Anfang ==================
cgi.fix_pathinfo = 0
============== Code - Ende ==================

cp /etc/php/8.0/mods-available/apcu.ini /etc/php/8.0/mods-available/apcu.ini.bak -> Falls nicht vorhanden, dann erstellen
sed -i '$aapc.enable_cli=1' /etc/php/8.0/mods-available/apcu.ini
systemctl restart nginx.service
systemctl restart php8.0-fpm.service

=========== Webserver konfigurieren =================================
mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf_php_test
nano /etc/nginx/conf.d/cloud.homeofmiku.de

===================== Code - Anfang ==========================================
upstream php-handler {
    server unix:/run/php/php8.0-fpm.sock;
}
server {
    listen 80;
    listen [::]:80;
    server_name  192.168.178.150;    --> IP-Adresse anpassen!!!!!!

   # Path to the root of your installation
    root /var/www/nextcloud/;
#==============================================================================
# DNS resolver
   resolver 192.168.178.1;
#===============================================================================
   # Add headers to serve security related headers

   # HSTS (ngx_http_headers_module is required)
    add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload;" always; 
    add_header X-Content-Type-Options "nosniff" always;
    add_header X-XSS-Protection "1; mode=block" always;
    add_header X-Robots-Tag none always;
    add_header X-Download-Options noopen always;
    add_header X-Permitted-Cross-Domain-Policies none always;
    add_header Referrer-Policy no-referrer always;
    add_header X-Frame-Options "SAMEORIGIN" always;

   # Remove X-Powered-By, which is an information leak
    fastcgi_hide_header X-Powered-By;
#==============================================================================

   # Nextcloud configuration
   # https://decatec.de/home-server/nextcloud-auf-ubuntu-server-20-04-lts-mit-nginx-mariadb-php-lets-encrypt-redis-und-fail2ban/

  # set max upload size
    client_max_body_size 10G;
    fastcgi_buffers 64 4K;


   # Enable gzip but do not remove ETag headers
    gzip on;
    gzip_vary on;
    gzip_comp_level 4;
    gzip_min_length 256;
    gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
    gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

   # Specify how to handle directories -- specifying '/index.php$request_uri'
   # here as the fallback means that Nginx always exhibits the desired behaviour
   # when a client requests a path that corresponds to a directory that exists
   # on the server. In particular, if that directory contains an index.php file,
   # that file is correctly served; if it doesn't, then the request is passed to
   # the front-end controller. This consistent behaviour means that we don't need
   # to specify custom rules for certain paths (e.g. images and other assets,
   # '/updater', '/ocm-provider', '/ocs-provider'), and thus
   # 'try_files $uri $uri/ /index.php$request_uri'
   # always provides the desired behaviour.
    index index.php index.html /index.php$request_uri;

      # Rule borrowed from '.htaccess' to handle Microsoft DAV clients
    location = / {
        if ( $http_user_agent ~ ^DavClnt ) {
            return 302 /remote.php/webdav/$is_args$args;
        }
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    # Make a regex exception for '/.well-known' so that clients can still
    # access it despite the existence of the regex rule
    # 'location ~ /(\.|autotest|...)' which would otherwise handle requests
    # for '/.well-known'.
    location ^~ /.well-known {
        # The following 6 rules are borrowed from '.htaccess'

        location = /.well-known/carddav     { return 301 /remote.php/dav/; }
        location = /.well-known/caldav      { return 301 /remote.php/dav/; }
        # Anything else is dynamically handled by Nextcloud
        location ^~ /.well-known            { return 301 /index.php$uri; }

        try_files $uri $uri/ =404;
    }

    # Rules borrowed from '.htaccess' to hide certain paths from clients
    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)(?:$|/)  { return 404; }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console)              { return 404; }

    # Ensure this block, which passes PHP files to the PHP process, is above the blocks
    # which handle static assets (as seen below). If this block is not declared first,
    # then Nginx will encounter an infinite rewriting loop when it prepends '/index.php'
    # to the URI, resulting in a HTTP 500 error response.
    location ~ \.php(?:$|/) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        set $path_info $fastcgi_path_info;

        try_files $fastcgi_script_name =404;

        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $path_info;
       # fastcgi_param HTTPS on;

        fastcgi_param modHeadersAvailable true;         # Avoid sending the security headers twice
        fastcgi_param front_controller_active true;     # Enable pretty urls
        fastcgi_pass php-handler;

        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;

		fastcgi_read_timeout 600;
		fastcgi_send_timeout 600;
		fastcgi_connect_timeout 600;

		fastcgi_param PHP_VALUE "upload_max_filesize = 10G
			post_max_size = 10G
			max_execution_time = 3600
			output_buffering = off";
    }

    location ~ \.(?:css|js|svg|gif)$ {
        try_files $uri /index.php$request_uri;
        expires 6M;         # Cache-Control policy borrowed from '.htaccess'
        access_log off;     # Optional: Don't log access to assets
    }

    location ~ \.woff2?$ {
        try_files $uri /index.php$request_uri;
        expires 7d;         # Cache-Control policy borrowed from '.htaccess'
        access_log off;     # Optional: Don't log access to assets
    }

    location / {
        try_files $uri $uri/ /index.php$request_uri;
    }
}
===================== Code - Ende ==========================================
nginx -t
systemctl restart nginx.service
systemctl restart php8.0-fpm.service

=========== Nextcloud konfigurieren =================================
cd /var/www
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
wget https://download.nextcloud.com/server/releases/latest.tar.bz2.md5
md5sum -c latest.tar.bz2.md5 < latest.tar.bz2 --> OK
tar -xjf latest.tar.bz2 -C /var/www && chown -R www-data:www-data /var/www/ && rm -f latest.tar.bz2