Installation Contao 5.3.43 auf Debian 13 - Login Backend nicht möglich
Hallo,
ich installiere jetzt wohl schon zum 5. mal Contao 5.3.43 auf einem frisch installierten Debian 13 mit Apache2 und Php8.4 auf einem Hetzner Server in einer Proxmox-VM neu.
Die installierten php-Module: php-intl php-imagick php-zip php-gd php-curl php-mbstring php-xml php-mysql php-json php-fileinfo php-zstd
Mods vom Apache2: rewrite und headers aktiviert
Datenbank: MariaDB 11.8.3, DB übers Terminal angelegt, alles aus dem Debian Repository.
Apache2-Konfiguration:
Code:
<VirtualHost *:80>
ServerName example.org
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/public
<Directory /var/www/html/public>
AllowOverride All
Require all granted
Options SymLinksIfOwnerMatch
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
In der /etc/php/8.4/apache2/php.ini habe ich die entsprechenden Einträge geändert von hier: https://docs.contao.org/5.x/manual/e...-requirements/
php-Module:
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib
zstd
[Zend Modules]
Zend OPcache
Installlation läuft sauber mit https://example.org/contao-manager.phar/ durch (vor dem Apache2 bzw der VM ist ein HAProxy, der die SSL-Zertifikate und die SSL-Verbindung herstellt. Auf der VM auf der Contao läuft ist keine SSL-Konfiguration nötig. Ohne Contao mit der index.html von Debian ist die Seite ganz normal über https erreichbar).
Nach der Installation kommt "Contao 5.3.43 wurde erfolgreich installiert." und ich habe die Wahl, zum Contao Manager zu gehen oder zum Backend. Erstes funktioniert, in den Contao Manager komme ich rein. Dort wird unter "Systemwartung" alles grün angezeigt bis auf Backup erstellen. Aber das Backend/Frontend ist nicht erreichbar. Ich kann zwar die URL https://example.org/contao/login aufrufen, aber nach der Eingabe von USER/PASS vom Manager kommt "Anmeldung fehlgeschlagen". Ich kann auf "Zum Frontend" klicken, da kommt "Verbindung fehlgeschlagen".
Ich habe auch die Berechtigungen gecheckt bzw gesetzt: chown -R www-data:www-data /var/www/
Jemand eine Idee?
Ich bin nach dieser Anleitung vorgegangen: https://docs.contao.org/5.x/manual/d...ontao-manager/
Im Contao Manager unter TOOLS -> System-Log steht ein Eintrag:
Code:
Error thrown while running command "contao:user:list --format=json --column=username --column=name --column=admin --column=dateAdded --column=lastLogin --no-interaction". Message: "An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'contao.tl_user' doesn't exist" {"exception":"[object] (Doctrine\\DBAL\\Exception\\TableNotFoundException(code: 1146): An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'contao.tl_user' doesn't exist at /var/www/html/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:51)\n[previous exception]
Liste der Anhänge anzeigen (Anzahl: 1)
Zitat:
Zitat von
Spooky
Hast du denn während der Installation im Contao Manager einen Backend User Account angelegt?
Hm, davon habe ich nichts in der Anleitung gelesen bzw kam da auch nichts wärend der Installation. Ich starte sie nochmal ...
Anhang 28160
Liste der Anhänge anzeigen (Anzahl: 2)
Einmal das Backend, das funktioniert:
Anhang 28161
Und das Frontend:
Anhang 28162
Ich rufe es bewusst aus dem LAN auf um den HAProxy als Fehlerquelle auszuschließen.
Liste der Anhänge anzeigen (Anzahl: 1)
Auch wenn es eigentlich nichts mit HAProxy zu tun haben kann, habe ich mal
TRUSTED_HOSTS=example.org
TRUSTED_PROXIES=192.168.1.2
in die /var/www/html/.env.local
geschrieben. ÄNdert aber auch nichts.
Also nach meiner Auffassung müsste das Frontend ganz normal angezeigt werden, sehr komisch..
Ich habe mal chromium installiert auf der LAN-VM, dann tcpdump horchen lassen:
Code:
[root@contao:/var/www/html]$ tcpdump -v port 80 and src 192.168.1.3
tcpdump: listening on ens18, link-type EN10MB (Ethernet), snapshot length 262144 bytes
14:54:13.483018 IP (tos 0x0, ttl 64, id 53630, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.3.52422 > contao.http: Flags [F.], cksum 0x8385 (incorrect -> 0x2fc4), seq 2275525385, ack 3730601982, win 497, options [nop,nop,TS val 347582132 ecr 2756504530], length 0
14:54:13.483019 IP (tos 0x0, ttl 64, id 49712, offset 0, flags [DF], proto TCP (6), length 60)
192.168.1.3.35740 > contao.http: Flags [S], cksum 0x838d (incorrect -> 0x5c57), seq 365889586, win 64240, options [mss 1460,sackOK,TS val 347582132 ecr 0,nop,wscale 7], length 0
14:54:13.483266 IP (tos 0x0, ttl 64, id 49713, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.3.35740 > contao.http: Flags [.], cksum 0x8385 (incorrect -> 0x3978), ack 832703550, win 502, options [nop,nop,TS val 347582132 ecr 2756536424], length 0
14:54:13.483419 IP (tos 0x0, ttl 64, id 49714, offset 0, flags [DF], proto TCP (6), length 495)
192.168.1.3.35740 > contao.http: Flags [P.], cksum 0x8540 (incorrect -> 0x2b1d), seq 0:443, ack 1, win 502, options [nop,nop,TS val 347582132 ecr 2756536424], length 443: HTTP, length: 443
GET / HTTP/1.1
Host: 192.168.1.11
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
14:54:13.538680 IP (tos 0x0, ttl 64, id 49715, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.3.35740 > contao.http: Flags [.], cksum 0x8385 (incorrect -> 0x34a2), ack 690, win 497, options [nop,nop,TS val 347582188 ecr 2756536479], length 0
14:54:13.567322 IP (tos 0x0, ttl 64, id 49716, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.3.35740 > contao.http: Flags [.], cksum 0x8385 (incorrect -> 0x3464), ack 695, win 497, options [nop,nop,TS val 347582216 ecr 2756536508], length 0
14:54:18.614662 IP (tos 0x0, ttl 64, id 49717, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.3.35740 > contao.http: Flags [.], cksum 0x8385 (incorrect -> 0x0d1e), ack 696, win 497, options [nop,nop,TS val 347587264 ecr 2756541513], length 0
14:55:03.602673 IP (tos 0x0, ttl 64, id 49718, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.3.35740 > contao.http: Flags [.], cksum 0x8385 (incorrect -> 0x5d62), ack 696, win 497, options [nop,nop,TS val 347632252 ecr 2756541513], length 0
Die 192.168.1.3 ist die VM, von der aus ich ohne https contao aufrufe. 192.168.1.11 ist die VM auf der Contao läuft. Also es kommt etwas an, aber "cksum incorrect"..?
(Der angehängte Fehler kam durch das Setzen von TRUSTED_HOSTS in der .env.local, hab das wieder rausgenommen jetzt ist das Backend wieder erreichbar.
Liste der Anhänge anzeigen (Anzahl: 1)
OK, Lösung war, in den Seiten von der Demo das Protokoll auf http zu setzen. Jetzt ist die Seite erreichbar, nur ohne Bilder/Design:
Anhang 28164
Code:
Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure image '<URL>'. This request has been blocked; the content must be served over HTTPS.
Habe diesen Thread gefunden:
https://community.contao.org/de/show...-Reverse-Proxy
Leider ohne Antwort ob die Lösung gefunden wurde.