Keinen Zugriff auf https://192.168.178.19:4443/

Hallo, auf meinem Raspi 4, auf dem ein Raspbian lÀuft, habe ich dieses Kommando abgesetzt:
curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | sudo bash

Die Installation hatte bei MariaDB einen Fehler gebracht. Ich habe MariaDB schon vorher installiert gehabt und es lÀuft ein IoBroker auf dem Raspi und ein piHole und unbound.

Nach der Installation bekomme ich ein: Firefox kann keine Verbindung zu dem Server unter 192.168.178.19:4443 aufbauen

Ein 192.168.178.19 bringt mich zur Apache2 Debian Default Page, aber nicht zu der nextcloud. Docker oder snap habe ich nicht installiert.

Was kann ich denn jetzt noch tun? Ich bin ĂŒberfragt


Edit:
Ein sudo service apache2 status bringt:

● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-07-24 19:57:03 CEST; 27min ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 14800 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Jul 24 19:57:03 raspberrypi-iob apachectl[14800]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:
Jul 24 19:57:03 raspberrypi-iob apachectl[14800]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0
Jul 24 19:57:03 raspberrypi-iob apachectl[14800]: no listening sockets available, shutting down
Jul 24 19:57:03 raspberrypi-iob apachectl[14800]: AH00015: Unable to open logs
Jul 24 19:57:03 raspberrypi-iob apachectl[14800]: Action 'start' failed.
Jul 24 19:57:03 raspberrypi-iob apachectl[14800]: The Apache error log may have more information.
Jul 24 19:57:03 raspberrypi-iob systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jul 24 19:57:03 raspberrypi-iob systemd[1]: apache2.service: Failed with result 'exit-code'.
Jul 24 19:57:03 raspberrypi-iob systemd[1]: Failed to start The Apache HTTP Server.
Jul 24 20:02:24 raspberrypi-iob systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.

Der Apache Webserver lÀuft nicht/kann nicht gestartet werden. Was spuckt das Apache error log konkret zu diesem Fehler aus?

Was sagt:
$ sudo netstat -anp | grep httpd

Hallo Tamsy, auf Port 80 hat die PiHole-OberflÀche gelauscht. Das habe ich mittlerweile geÀndert. Nun bkeomme ich bei dem Aufruf von 192.168.178.19 ein:

Beim Verbinden mit 192.168.178.19 trat ein Fehler auf. PR_END_OF_FILE_ERROR

Ein:

androidin@raspberrypi-iob:~ $ sudo systemctl status apache2.service -l --no-pager
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-07-24 21:01:26 CEST; 9h ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 894 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Jul 24 21:01:26 raspberrypi-iob apachectl[894]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
Jul 24 21:01:26 raspberrypi-iob apachectl[894]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
Jul 24 21:01:26 raspberrypi-iob apachectl[894]: no listening sockets available, shutting down
Jul 24 21:01:26 raspberrypi-iob apachectl[894]: AH00015: Unable to open logs
Jul 24 21:01:26 raspberrypi-iob apachectl[894]: Action 'start' failed.
Jul 24 21:01:26 raspberrypi-iob apachectl[894]: The Apache error log may have more information.
Jul 24 21:01:26 raspberrypi-iob systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jul 24 21:01:26 raspberrypi-iob systemd[1]: apache2.service: Failed with result 'exit-code'.
Jul 24 21:01:26 raspberrypi-iob systemd[1]: Failed to start The Apache HTTP Server.
Jul 24 21:05:10 raspberrypi-iob systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.

D. h. auf dem Port 443 lauscht der Deconz Adapter vom ioBorker:

androidin@raspberrypi-iob:~ $ sudo ss -4 -tlnp | grep 443
LISTEN    0         50                 0.0.0.0:443              0.0.0.0:*        users:(("deCONZ",pid=312,fd=11))

obwohl ich den eigenltich ĂŒber den Port 8080 aufrufe. Das verstehe ich nicht.

Der von dir angeforderte Kommando sagt:

androidin@raspberrypi-iob:~ $ sudo netstat -anp | grep httpd
tcp        0      0 0.0.0.0:180             0.0.0.0:*               LISTEN      732/lighttpd
tcp6       0      0 :::180                  :::*                    LISTEN      732/lighttpd
unix  2      [ ACC ]     STREAM     HÖRT         20514    809/php-cgi          /var/run/lighttpd/php.socket-0
unix  3      [ ]         STREAM     VERBUNDEN     19453    732/lighttpd

Es lÀuft also noch ein lighttpd, ich weiss aber gerade nicht, wer den braucht. piHole, deconz oder ioBroker


Hallo androidin,

auf Deinem Raspi startet Apache nicht, da port 443 von einem anderen Dienst belegt ist:

Jul 24 21:01:26 raspberrypi-iob apachectl[894]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
Jul 24 21:01:26 raspberrypi-iob apachectl[894]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443

Du schreibst Port 443 belegt bereits ein Deconz Adapter unter ioBroker.

D.h. Du musst in der Apachekonfiguration (httpd.conf oder/und httpd-ssl.conf) den Port entsprechend Àndern (Standart/Default SSL-Port ist 443). Du willst ja Port 4443, also solltest Du den Port in der Apachekonfiguration entsprechend auf 4443 Àndern.

Wegen dem parallelen ioBroker/Deconz bin ich etwas ĂŒberfragt. Habe hier Home Assistant mit dem Slaesh-Stick fĂŒr Zigbee am laufen, allerdings auf einem dedizierten RPI4. Auch eine PiHole lĂ€uft hier, aber auf einem dedizierten RPI3.
Ich frage mich ohnehin, ob der RPI mit ioBroker und PiHole und NC nicht reichlich ĂŒberfrachtet ist und in die Knie geht. Machst Du Dir damit eine Freude???

Das können Dir sicher andere Nutzer besser erklÀren. Ich verwende NC auf einem Root Server beim Hoster.

PS. lighttpd wird von der PiHole mitinstalliert.

$ sudo netstat -anp | grep lighttpd

zeigt Dir, auf welche Ports lighthttpd lauscht.

OK, den Port vom apache server konnte ich nun auf 808 schieben, indem ich die Datei ports.conf unter /etc/apache2 geÀndert habe:

androidin@raspberrypi-iob:/etc/apache2 $ cat ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 808

<IfModule ssl_module>
        Listen 4433
</IfModule>

<IfModule mod_gnutls.c>
        Listen 4433
</IfModule>

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

Nun ist die Defaul-Seite von Apache erreichbar unter 192.168.178.19:808. Auch der Status von Apache zeigt nun an, dass er lÀuft:

androidin@raspberrypi-iob:/etc/apache2 $ sudo systemctl status apache2.service -l --no-pager
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2021-07-25 12:09:09 CEST; 2min 16s ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 28747 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 28756 (apache2)
    Tasks: 129 (limit: 4915)
   CGroup: /system.slice/apache2.service
           ├─28756 /usr/sbin/apache2 -k start
           ├─28758 /usr/sbin/apache2 -k start
           └─28759 /usr/sbin/apache2 -k start

Jul 25 12:09:09 raspberrypi-iob systemd[1]: Starting The Apache HTTP Server...
Jul 25 12:09:09 raspberrypi-iob systemd[1]: Started The Apache HTTP Server.

Allerdings ist es nur die Default-Seite von Apache und nicht die nextcloud admin Seite. Unter dem Port 4443 erreiche ich auch nichts. Jetzt bin ich wirklich mit meinem Latein am Ende :frowning:

Sind die Ports 808 und 4443 offen und Apache “lauscht” an den Ports?

sudo netstat -anp | grep httpd

Fange erst einmal mit http (unverschlĂŒsselt) an und sobald der Zugriff funktioniert konfigurierst Du https (SSL) nach.

In der Datei /etc/apache2/sites-enabled/000-default.conf findest Du die Konfigurationsanweisung fĂŒr den Aufruf der Defaul-Seite von Apache. Ändere den Pfad entsprechend zu Deiner NC-Installation (DocumentRoot /pfad/zu/nextcloud).

Darunter fĂŒge auch ein:

<Directory /pfad/zu/nextcloud/>
	Options -Indexes +FollowSymLinks +MultiViews
	AllowOverride None
	Require all granted
</Directory>

Das sind alles absolute Apache-Basics und Du findest reichlich Anleitungen im Netz dazu.

PS. Denke daran Apache neu zu starten, damit Änderungen an der Konfiguration wirksam werden.

1 Like