Page 3 of 3

Re: Reverse Proxy Fehlermeldung

Posted: Sat 20. Jan 2024, 16:21
by Jolinar
Da wir im OT sind, geh ich kurz darauf ein...
24unix wrote: Sat 20. Jan 2024, 16:13 Ist aber nicht immer zur vollen Minute …

Code: Select all

[20-Jan-2024 00:02:18] INFO | Update statistics...
Die Aufgabenbearbeitung findet zu jeder vollen Minute statt. Da dieser Prozeß nur den Bruchteil einer Sekunde braucht, haut das mit den "00" Sekunden schon recht gut hin.
Übrigens hast du die Meldung für das Statistik Update zitiert, das wird wohl ein paar Sekunden brauchen, bis es durchgelaufen ist. ;)

24unix wrote: Sat 20. Jan 2024, 16:13 Doch, dem Alter (den Augen) angepasst sogar in RIESIG :-)
Du hast keine Sekundenanzeige, deswegen funktioniert meine Methode bei dir garnicht.. :lol: :lol:

Re: Reverse Proxy Fehlermeldung

Posted: Sat 20. Jan 2024, 16:30
by 24unix
Jolinar wrote: Sat 20. Jan 2024, 16:21 Da wir im OT sind, geh ich kurz darauf ein...
24unix wrote: Sat 20. Jan 2024, 16:13 Ist aber nicht immer zur vollen Minute …

Code: Select all

[20-Jan-2024 00:02:18] INFO | Update statistics...
Die Aufgabenbearbeitung findet zu jeder vollen Minute statt. Da dieser Prozeß nur den Bruchteil einer Sekunde braucht, haut das mit den "00" Sekunden schon recht gut hin.
Übrigens hast du die Meldung für das Statistik Update zitiert, das wird wohl ein paar Sekunden brauchen, bis es durchgelaufen ist. ;)
Stimmt, hatte ich falsch im Hinterkopf.

Die geht wirklich zur vollen Minute los:

Code: Select all

*/1 * * * * root nice -n 5 php /home/keyhelp/www/keyhelp/cronjob/mastercronjob.php
Jolinar wrote: Sat 20. Jan 2024, 16:21
24unix wrote: Sat 20. Jan 2024, 16:13 Doch, dem Alter (den Augen) angepasst sogar in RIESIG :-)
Du hast keine Sekundenanzeige, deswegen funktioniert meine Methode bei dir garnicht.. :lol: :lol:
Ich sehe ja, wenn die Minute sich ändert :-)
Bräuchte ich Sekunden, hätte ich welche:

Code: Select all

 20 spacebar -m config clock_format       "%A %d.%m.%y %R"
Kann man sich fein selber zusammenbasteln :-)

Re: Reverse Proxy Fehlermeldung

Posted: Sat 20. Jan 2024, 21:36
by Dreandor
24unix wrote: Sat 20. Jan 2024, 16:04
Jolinar wrote: Sat 20. Jan 2024, 15:38 Über die Brücke würde ich nicht gehen...Der TE gibt ja an, daß er die vHost Config selber modifiziert hat:
Stimmt, das hatte ich glatt überlesen.
Dreandor wrote: Sat 20. Jan 2024, 15:51 Erklärt ja trotzdem nicht warum keine https.conf geschrieben wird, wenn ich alles so einrichte wie ihr es sagt.
Die wird nicht sofort geschrieben, 1x die Minute per Cronjob.

Ich habe bei solchen Sachen immer ein extra Terminal mit

Code: Select all

tail -f /var/log/keyhelp/cronjob/*.log
(mit Sudo, falls Du nicht root bist)
Hier der Cronjob Log

Code: Select all

==> /var/log/keyhelp/cronjob/package-update.log <==
Setting up docker-buildx-plugin (0.12.1-1~debian.11~bullseye) ...
Setting up docker-compose-plugin (2.24.1-1~debian.11~bullseye) ...
Setting up docker-ce-cli (5:25.0.0-1~debian.11~bullseye) ...
Setting up docker-ce-rootless-extras (5:25.0.0-1~debian.11~bullseye) ...
Setting up docker-ce (5:25.0.0-1~debian.11~bullseye) ...
Installing new version of config file /etc/init.d/docker ...
Processing triggers for man-db (2.9.4-2) ...
[20-Jan-2024 03:00:21] INFO | ... successful
[20-Jan-2024 03:00:22] INFO | set correct tmp-directories mount for normal behavior
====

==> /var/log/keyhelp/cronjob/panel-update.log <==
[20-Jan-2024 02:00:01] INFO | now waiting for 923 seconds until conntecting to update server!
[20-Jan-2024 02:15:24] INFO | maintenance log okay
[20-Jan-2024 02:15:24] INFO | trying to connect to updateserver
[20-Jan-2024 02:15:24] INFO | current version is up to date, no update needed.
====
[20-Jan-2024 02:30:01] INFO | now waiting for 277 seconds until conntecting to update server!
[20-Jan-2024 02:34:38] INFO | maintenance log okay
[20-Jan-2024 02:34:38] INFO | trying to connect to updateserver
[20-Jan-2024 02:34:38] INFO | current version is up to date, no update needed.
====

==> /var/log/keyhelp/cronjob/repo-update.log <==
====
[20-Jan-2024 05:00:01] INFO | starting repo update
[20-Jan-2024 05:00:01] INFO | now waiting for 281 seconds until conntecting to repository!
[20-Jan-2024 05:04:42] INFO | step: uninstall php versions
[20-Jan-2024 05:04:42] INFO | no tasks found
[20-Jan-2024 05:04:42] INFO | step: update php versions
[20-Jan-2024 05:04:44] INFO | no tasks found, everything is up to date
[20-Jan-2024 05:04:44] INFO | step: install new php versions
[20-Jan-2024 05:04:44] INFO | no tasks found
====

==> /var/log/keyhelp/cronjob/ssl-maintenance.log <==
[20-Jan-2024 00:00:19] INFO | check domain "forum.dreandor.de'
[20-Jan-2024 00:00:19] INFO | certificate is valid until 2024-03-07 23:00:18 (47 days left)
[20-Jan-2024 00:00:19] INFO | check domain "cloud.dreandor.de'
[20-Jan-2024 00:00:19] INFO | certificate is valid until 2024-02-25 21:34:09 (36 days left)
[20-Jan-2024 00:00:19] INFO | check domain "bot.dreandor.de'
[20-Jan-2024 00:00:19] INFO | certificate is valid until 2024-03-15 20:40:10 (55 days left)
[20-Jan-2024 00:00:19] INFO | check domain "dreandor.de'
[20-Jan-2024 00:00:19] INFO | certificate is valid until 2024-03-11 23:00:19 (51 days left)
[20-Jan-2024 00:00:19] INFO | finished
====

==> /var/log/keyhelp/cronjob/statistic.log <==
[20-Jan-2024 00:00:10] INFO | Update statistics...
[20-Jan-2024 00:00:10] INFO | Build statistic for 2024-1...
[20-Jan-2024 00:00:12] INFO | Domain "bot.dreandor.de"
[20-Jan-2024 00:00:12] INFO | Update statistics...
[20-Jan-2024 00:00:12] INFO | Build statistic for 2024-1...
[20-Jan-2024 00:00:14] INFO | Domain "mc.dreandor.de"
[20-Jan-2024 00:00:14] INFO | Update statistics...
[20-Jan-2024 00:00:14] INFO | Build statistics for 2023-12...
[20-Jan-2024 00:00:17] INFO | Build statistic for 2024-1...
====

==> /var/log/keyhelp/cronjob/update.log <==
[20-Jan-2024 21:35:02] INFO | Apache: syntax ok
[20-Jan-2024 21:35:02] INFO | Apache: reloading apache
[20-Jan-2024 21:35:02] INFO | PHP-FPM (php7.4-fpm): syntax ok
[20-Jan-2024 21:35:02] INFO | PHP-FPM (php7.4-fpm): reloading php-fpm
[20-Jan-2024 21:35:02] INFO | PHP-FPM (keyhelp-php82-fpm): syntax ok
[20-Jan-2024 21:35:02] INFO | PHP-FPM (keyhelp-php82-fpm): reloading php-fpm
[20-Jan-2024 21:35:03] INFO | SNI configuration updated
====
[20-Jan-2024 21:36:01] INFO | load tasks... nothing to do
====
Wieder mit ERR_CONNECTION_REFUSED beim Keyhelp Panel obwohl ich nur mc.dreandor.de bearbeitet habe.

Diesmal wurden wieder die custom vhost Dateien erstellt

Code: Select all

root@dreandor:/etc/apache2/keyhelp/custom_vhosts# ls
dreandor_de_mc.dreandor.de_http.conf  dreandor_de_mc.dreandor.de_https.conf
Und hier der Vhost Eintrag.

Code: Select all

# mc.dreandor.de
# Provide also HTTP container
<VirtualHost *:80>
  ServerName mc.dreandor.de
  ServerAdmin webmaster@mc.dreandor.de
  DocumentRoot "/home/users/dreandor_de/www/"
  SuexecUserGroup "dreandor_de" "dreandor_de"

  # Logging
  LogLevel warn
  CustomLog "/home/users/dreandor_de/logs/mc.dreandor.de/access.log" keyhelp_log
  ErrorLog "/home/users/dreandor_de/logs/mc.dreandor.de/error.log"

  # PHP support
  <FilesMatch "\.php$">
    <If "-f %{REQUEST_FILENAME}">
      SetHandler "proxy:unix:/run/php/keyhelp_dreandor_de.socket|fcgi://keyhelp_dreandor_de.socket"
    </If>
  </FilesMatch>

  # Set proxy properties (the string "unique-domain-name-string" should match
  # the one set in the FilesMatch directive.
  <Proxy fcgi://keyhelp_dreandor_de.socket>
    ProxySet connectiontimeout=5 timeout=60
  </Proxy>

  <Directory "/home/users/dreandor_de/www/">
    AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
    Options -Indexes
    CGIPassAuth On
  </Directory>

  # Include global directives
  IncludeOptional /etc/apache2/keyhelp/global_directives.conf


  # Include custom HTTP directives
  Include /etc/apache2/keyhelp/custom_vhosts/dreandor_de_mc.dreandor.de_http.conf

</VirtualHost>

<VirtualHost *:443>
  ServerName mc.dreandor.de
  ServerAdmin webmaster@mc.dreandor.de
  DocumentRoot "/home/users/dreandor_de/www/"
  SuexecUserGroup "dreandor_de" "dreandor_de"

  # SSL
  SSLEngine On
  SSLCertificateFile /etc/ssl/keyhelp/letsencrypt/dreandor_de/mc.dreandor.de/complete.pem
  SSLCertificateChainFile /etc/ssl/keyhelp/letsencrypt/dreandor_de/mc.dreandor.de/chain.pem

  # Logging
  LogLevel warn
  CustomLog "/home/users/dreandor_de/logs/mc.dreandor.de/access.log" keyhelp_log
  ErrorLog "/home/users/dreandor_de/logs/mc.dreandor.de/error.log"

  # PHP support
  <FilesMatch "\.php$">
    <If "-f %{REQUEST_FILENAME}">
      SetHandler "proxy:unix:/run/php/keyhelp_dreandor_de.socket|fcgi://keyhelp_dreandor_de.socket"
    </If>
  </FilesMatch>

  # Set proxy properties (the string "unique-domain-name-string" should match
  # the one set in the FilesMatch directive.
  <Proxy fcgi://keyhelp_dreandor_de.socket>
    ProxySet connectiontimeout=5 timeout=60
  </Proxy>

  <Directory "/home/users/dreandor_de/www/">
    AllowOverride AuthConfig FileInfo Indexes Limit Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
    Options -Indexes
    CGIPassAuth On
  </Directory>

  # Include global directives
  IncludeOptional /etc/apache2/keyhelp/global_directives.conf


  # Include custom HTTPS directives
  Include /etc/apache2/keyhelp/custom_vhosts/dreandor_de_mc.dreandor.de_https.conf

</VirtualHost>

Re: Reverse Proxy Fehlermeldung

Posted: Sun 21. Jan 2024, 00:50
by 24unix
Dreandor wrote: Sat 20. Jan 2024, 21:36 Diesmal wurden wieder die custom vhost Dateien erstellt
Und nun

Code: Select all

apache2ctl -t
und wir kommen der Sache näher.

Re: Reverse Proxy Fehlermeldung

Posted: Sun 21. Jan 2024, 11:11
by Dreandor
24unix wrote: Sun 21. Jan 2024, 00:50
Dreandor wrote: Sat 20. Jan 2024, 21:36 Diesmal wurden wieder die custom vhost Dateien erstellt
Und nun

Code: Select all

apache2ctl -t
und wir kommen der Sache näher.
Hier

Code: Select all

root@dreandor:~# apache2ctl -t
Syntax OK

Re: Reverse Proxy Fehlermeldung

Posted: Sun 21. Jan 2024, 12:01
by 24unix
Dreandor wrote: Sun 21. Jan 2024, 11:11
24unix wrote: Sun 21. Jan 2024, 00:50
Dreandor wrote: Sat 20. Jan 2024, 21:36 Diesmal wurden wieder die custom vhost Dateien erstellt
Und nun

Code: Select all

apache2ctl -t
und wir kommen der Sache näher.
Hier

Code: Select all

root@dreandor:~# apache2ctl -t
Syntax OK
Mit dem von KH generiertem vhost inkludiert?

Du hast geschrieben, dass nach der Änderung das Panel nicht mehr reagiert, das deutet auf eine fehlerhafte apache config hin, aber laut der Ausgabe ist sie ok.

Re: Reverse Proxy Fehlermeldung

Posted: Sun 21. Jan 2024, 12:03
by Dreandor
24unix wrote: Sun 21. Jan 2024, 12:01
Dreandor wrote: Sun 21. Jan 2024, 11:11
24unix wrote: Sun 21. Jan 2024, 00:50

Und nun

Code: Select all

apache2ctl -t
und wir kommen der Sache näher.
Hier

Code: Select all

root@dreandor:~# apache2ctl -t
Syntax OK
Mit dem von KH generiertem vhost inkludiert?

Du hast geschrieben, dass nach der Änderung das Panel nicht mehr reagiert, das deutet auf eine fehlerhafte apache config hin, aber laut der Ausgabe ist sie ok.
Ja genau. Die custom_vhost's sind erstellt worden jetzt und jetzt kann ich nicht mehr auf das KH Panel zugreifen.

Code: Select all

root@dreandor:/etc/apache2/keyhelp/custom_vhosts# ls
dreandor_de_mc.dreandor.de_http.conf  dreandor_de_mc.dreandor.de_https.conf
dreandor_de_mc.dreandor.de_http.conf

Code: Select all

RewriteEngine on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
dreandor_de_mc.dreandor.de_https.conf

Code: Select all

ProxyPreserveHost On
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off

RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule .* "wss://127.0.0.1:8143%{REQUEST_URI}" [P]

SSLCertificateFile /var/opt/minecraft/crafty/crafty-4/app/config/web/certs/commander.cert.pem
SSLCertificateKeyFile /var/opt/minecraft/crafty/crafty-4/app/config/web/certs/commander.key.pem

ProxyPass / https://127.0.0.1:8143/
ProxyPassReverse / https://127.0.0.1:8143/
ProxyRequests off

Re: Reverse Proxy Fehlermeldung

Posted: Sun 21. Jan 2024, 12:13
by 24unix
Also syntax is laut apache OK, aber trotzdem kommst Du nicht auf Panel.

Dann wäre die log vom Apachen und vom php interessant.

Aktiviere die nicht funktionierende Version wieder versuche das Panel aufzurufen.

Parallel, in der Console, nach dem erfolglosem Versuch:

Code: Select all

tail -n 20 /var/log/apache2/keyhelp/error.log
tail -n 2 /var/log/php7.4-fpm.log

Re: Reverse Proxy Fehlermeldung

Posted: Sun 21. Jan 2024, 12:16
by Dreandor
24unix wrote: Sun 21. Jan 2024, 12:13 Also syntax is laut apache OK, aber trotzdem kommst Du nicht auf Panel.

Dann wäre die log vom Apachen und vom php interessant.

Aktiviere die nicht funktionierende Version wieder versuche das Panel aufzurufen.

Parallel, in der Console, nach dem erfolglosem Versuch:

Code: Select all

tail -n 20 /var/log/apache2/keyhelp/error.log
tail -n 2 /var/log/php7.4-fpm.log
Bei dem ersten tail kommt nichts.
Beim zweiten tail

Code: Select all

php7.4-fpm.log
[21-Jan-2024 00:00:02] NOTICE: error log file re-opened
Wenn ich die Includes raus werfe dann komm ich auch wieder ins Panel.

Ich habe das Include aus /etc/apache2/keyhelp/vhosts/dreandor_de.conf auskommentiere geht das Panel auch wieder.

Code: Select all

# Include custom HTTPS directives
  # Include /etc/apache2/keyhelp/custom_vhosts/dreandor_de_mc.dreandor.de_https.conf

Re: Reverse Proxy Fehlermeldung

Posted: Wed 24. Jan 2024, 20:26
by Dreandor
Bin mittlerweile auf einen frischen neuen Server umgezogen und habe Keyhelp ganz frisch installiert.

Wieder das Problem mit dem Connection Refused wenn ich HTTPS Anweisungen hinterlege. Muss das wieder auskommentieren.