Nextcloud Installation Teil 3 - Absicherung, App-Installation, Fehlerbehebung

SSL Certificate

openssl Mit dem Kommando openssl wird das SSL-Zertifikat für den Heimgebrauch erstellt.

openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt

Danach die Zertifikate an den Richtigen Ort kopiert:

   cp certificate.crt /etc/ssl/certs/
   cp privateKey.key /etc/ssl/private/
   openssl x509 -in certificate.crt -text
   a2enmod ssl
   systemctl restart apache2

Apache2 SSL anpassen

root@nextcloud:~# ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/default-ssl.conf
root@nextcloud:~# vi /etc/apache2/sites-enabled/default-ssl.conf

	<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/nextcloud

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                SSLEngine on

                SSLCertificateFile    /etc/ssl/certs/certificate.crt
                SSLCertificateKeyFile /etc/ssl/private/privateKey.key

                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>

        </VirtualHost>
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Aktiviert site-enable

a2ensite nextcloud.conf

EMail Program RainLoop

Standard EMail von Nextcloud deaktivieren.

Default Passwort admin/12345 Admin Login und die Domain anpassen.

Kalender

Kalender mit dem Android Smartphon / Thunderbird verbinden.

http://192.168.178.110/remote.php/dav/calendars/Admin/personal/

Update Fehler

Nach einem Update wird php nicht richtig erkannt.

a2enmod php8.1 (PHP Version)
systemctl restart apache2
  • Die PHP-Speichergrenze liegt unterhalb des empfohlenen Wertes von 512MB.

  • Das PHP OPcache-Modul ist nicht richtig konfiguriert. Weitere Informationen findest du in der Dokumentation ↗.

    • Der OPcache-Zwischenspeicher für interne Zeichenfolgen ist fast voll. Um sicherzustellen, dass sich wiederholende Zeichenfolgen effektiv zwischengespeichert werden können, wird empfohlen, opcache.interned_strings_buffer mit einem Wert größer als 8 in deiner PHP-Konfiguration anzuwenden.

vi /etc/php/8.1/apache2/php.ini

; Maximum amount of memory a script may consume
; https://php.net/memory-limit
memory_limit = 1024M 

root@t-ubu-2004:/var/www/nextcloud/updater# a2enmod php8.1
Considering dependency mpm_prefork for php8.1:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.1:
Enabling module php8.1.
To activate the new configuration, you need to run:
  systemctl restart apache2
root@t-ubu-2004:/var/www/nextcloud/updater# systemctl restart apache2

https://askubuntu.com/questions/1406082/apache-php-modules-not-upgraded-in-22-04