Ich lasse den cloudflared-Daemon ordnungsgemäß laufen und habe ihn für unzählige Dinge verwendet (was bedeutet, dass der Tunnel ordnungsgemäß auf dem Server installiert ist), aber ich habe Schwierigkeiten, die Einrichtung von Discourse (./discourse-setup) dazu zu bringen, meinen Hostnamen für meine Discourse-Instanz zu erkennen.
Ich verwende biohacking.forum als Hostnamen für meine Instanz.
Dies ist meine Cloudflare Tunnel-Konfiguration für biohacking.forum:
Es fordert mich nach dem Hostnamen auf, ich gebe biohacking.forum ein.
Die folgende Meldung wird angezeigt:
Hostname for your Discourse? [discourse.example.com]: biohacking.forum
Checking your domain name . . .
WARNING: Port 443 of computer does not appear to be accessible using hostname: biohacking.forum.
WARNING: Connection to http://biohacking.forum (port 80) also fails.
This suggests that biohacking.forum resolves to some IP address that does not reach this
machine where you are installing discourse.
The first thing to do is confirm that biohacking.forum resolves to the IP address of this server.
You usually do this at the same place you purchased the domain.
If you are sure that the IP address resolves correctly, it could be a firewall issue.
A web search for "open ports YOUR CLOUD SERVICE" might help.
This tool is designed only for the most standard installations. If you cannot resolve
the issue above, you will need to edit containers/app.yml yourself and then type
./launcher rebuild app
Was soll ich tun, um diesen Schritt zum Laufen zu bringen? Bitte lassen Sie mich wissen, wenn Sie zusätzliche Informationen benötigen. Vielen Dank!
Ich verwende keinen Standard-A-Eintrag, sondern Cloudflare Tunnels. Hier ist ein Beispiel für einen Dienst, der auf meinem Server (mit Cloudflare Tunnels) perfekt funktioniert, und die zugehörige Konfiguration:
Ghost CMS ist der Dienst:
PORT: 8085:2368 (8085 ist Host und 2368 ist Dienst)
HOSTNAME: joshuahabka.com
Cloudflare Tunnel-Einrichtung:
Das orangefarbene Cloudflare-Symbol ist aktiviert, da es Cloudflare Tunnels verwendet, aber für Discourse sollte es als normaler Zugangsport gemeldet werden. Ich habe über 40 Dienste bereitgestellt und webzugänglich gemacht, und Discourse ist der erste, bei dem ich einige Fehler habe.
Bitte lassen Sie mich wissen, wenn Sie zusätzliche Informationen benötigen!
Für Discourse würde ich annehmen, dass der Port lautet:
443:443 (Host:Dienst), weshalb ich mein ursprüngliches Cloudflare-Tunnel-Setup wie oben gezeigt hatte.
Hallo Lilly, der oben genannte Leitfaden hat bei mir nicht funktioniert. Ich erhalte immer noch denselben Fehler, obwohl meine Cloudflare Tunnel-Konfiguration http://localhost:80 lautet, wie angegeben. Ich stecke immer noch fest bei
starserver@Starserver:/var/discourse$ sudo ./discourse-setup
Ports 80 and 443 are free for use
'samples/standalone.yml' -> 'containers/app.yml'
./discourse-setup: line 261: 4
scaling* 2: syntax error in expression (error token is "scaling* 2")
Hostname for your Discourse? [discourse.example.com]: biohacking.forum
Checking your domain name . . .
WARNING: Port 443 of computer does not appear to be accessible using hostname: biohacking.forum.
WARNING: Connection to http://biohacking.forum (port 80) also fails.
This suggests that biohacking.forum resolves to some IP address that does not reach this
machine where you are installing discourse.
The first thing to do is confirm that biohacking.forum resolves to the IP address of this server.
You usually do this at the same place you purchased the domain.
If you are sure that the IP address resolves correctly, it could be a firewall issue.
A web search for "open ports YOUR CLOUD SERVICE" might help.
This tool is designed only for the most standard installations. If you cannot resolve
the issue above, you will need to edit containers/app.yml yourself and then type
./launcher rebuild app
Leitet alle Anfragen mit dem Schema „http“ an „https“ weiter. Dies gilt für alle http-Anfragen an die Zone. bewirkt, dass Port 80 erfolgreich ist, aber nicht 443
Wenn eine Seitenregel aktiviert wird, um auf HTTPS umzuleiten, schlagen sowohl 80 als auch 443 fehl. Wenn sie jedoch nicht verwendet wird, schlägt 443 fehl und 80 ist erfolgreich.
FEHLGESCHLAGEN
--------------------
Pups::ExecError: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end' ist mit Rückgabewert # fehlgeschlagen<Process::Status: pid 134 exit 1>
Ort des Fehlschlags: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec fehlgeschlagen mit den Parametern {"tag"=>"precompile", "cmd"=>["/usr/local/bin/ruby -e 'if ENV[\"DISCOURSE_SMTP_ADDRESS\"] == \"smtp.example.com\"; puts \"Aborting! Mail is not configured!\"; exit 1; end'", "/usr/local/bin/ruby -e 'if ENV[\"DISCOURSE_HOSTNAME\"] == \"discourse.example.com\"; puts \"Aborting! Domain is not configured!\"; exit 1; end'", "/usr/local/bin/ruby -e 'if (ENV[\"DISCOURSE_CDN_URL\"] || \"\")[0..1] == \"//\"; puts \"Aborting! CDN must have a protocol specified. Once fixed you should rebake your posts now to correct all posts.\"; exit 1; end'"]}
bootstrap fehlgeschlagen mit Exit-Code 1
** BOOTSTRAP FEHLGESCHLAGEN ** Bitte scrollen Sie nach oben und suchen Sie nach früheren Fehlermeldungen, es kann mehr als eine geben.
./discourse-doctor kann bei der Diagnose des Problems helfen.
Das ist erledigt und jetzt ist alles in Ordnung. Ich würde einfach eine Notiz in die Self-Install-Anleitung für den Cloudflare Tunnel einfügen, dass die Leute das YAML-Dokument bearbeiten müssen, um ihre SMTP-Daten, Hostnamen, E-Mails usw. hinzuzufügen.