Jump to content
Froxlor Forum
  • 0

SSL Zertifikat wird im browser nicht erkannt


xep22

Question

moin,

habe auf einer testumgebung froxlor neu installiert, diesmal mit debian 9 und PHP 7. soweit ging auch alles, habe jetzt SSL aktiviert und die Webserver konfiguration durchgeführt. dann noch in putty diesen Befehl verwendet :

openssl req -new -days 999 -newkey rsa:4096bits -sha512 -x509 -nodes -out server.crt -keyout server.key

dann in Froxlor die IP mit port 443 hinzugefügt und gewartet. in froxlor wird das Zert. angezeigt und in /etc/ssl/froxlor-custom ist es auch. aber im Browser kommt 

Diese Website kann keine sichere Verbindung bereitstellen
janis0705.tk hat eine ungültige Antwort gesendet.

aber wieso ? das hat so immer funktioniert. was mache ich falsch ? wie kann ich da debuggen ?

Link to comment
Share on other sites

Recommended Posts

  • 0

Zum einen: was du erstellst in ein selbst-signiertes Zertifkat, das sollte eigentlich garnicht in /etc/ssl/froxlor-custom/ erstellt werden sondern auf den pfad zeigen, den du in den Einstellungen angibst

Zum zweiten: /etc/ssl/froxlor-custom/ sollte nicht für eigene Dateien verwendet werden, dieser Ordner wird komplett von froxlor verwaltet und daher ggfls auch mal geleert

Zum dritten: die Meldug aus dem Browser sagt leider nicht viel. Prüfe server logs und den entsprechenden ssl-vhost.

Link to comment
Share on other sites

  • 0
2 hours ago, xep22 said:

oder anders gefragt, wie soll man denn normalerweise lets encrypt automatisch generieren lassen ? SSL in froxlor aktivieren,  und dann ? gibts irgendwo eine doku/anleitungen ? 

Ja, einfach SSL in den Optionen aktivieren und LE aktivieren und den rest macht dann Froxlor selbst, nach dem der Cron gelaufen ist.

SSL-Einstellungen

Für Optimale SSL TLS settings für Apache2 oder Nginx Webserver => https://mozilla.github.io/server-side-tls/ssl-config-generator/
Pfad zu acme.conf => Bei Apache "/etc/apache2/acme.conf | Bei Nginx "/etc/nginx/acme.conf"

acme.conf

Alias "/.well-known/acme-challenge" "/var/www/html/Froxlor/.well-known/acme-challenge"
<Directory "/var/www/html/Froxlor/.well-known/acme-challenge">
    Require all granted
</Directory>

 

Optional:
Schlüsselgröße für neue Let's Encrypt Zertifikate => 4096 oder 8192
ECC / ECDSA Zertifikate ausstellen => ec-384

Froxlor VirtualHost Einstellungen

Let's Encrypt für den froxlor Vhost verwenden => Ja
SSL-Weiterleitung für den froxlor Vhost aktivieren => Ja
HTTP Strict Transport Security (HSTS) => 31536000

 

 

Link to comment
Share on other sites

  • 0

Habe das ganze jetzt so wie erklärt mal probiert, also nur SSL aktiviert, die Apache Konfiguration und Haken bei Domain setzen. Doch die Zertifikate werden nicht erstellt, und nach einigen Minuten erhalte ich mit

systemctl status apache2.service

auch folgenden Fehler :

Mai 10 18:37:59 root.janis0705.tk apachectl[26391]: AH00526: Syntax error on line 16 of /etc/apache2/sites-enabled/35_froxlor_ssl_vhost_janis0705.tk.conf:
Mai 10 18:37:59 root.janis0705.tk apachectl[26391]: SSLCertificateFile: file '/etc/apache2/apache2.pem' does not exist or is empty
Mai 10 18:37:59 root.janis0705.tk apachectl[26391]: Action 'graceful' failed.

selbst mit dem Force ( /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --force ) befehl werden die nicht erstellt. In froxlor wird das Zert. für die Website aber erstellt. wie erstelle ich aber für apache jetzt das notwendige noch ?

Link to comment
Share on other sites

  • 0

Da steht aber nirgends was das du, wenn du Let's Encrypt für froxlor selbst nutzen willst,. dass natürlich in den "Froxlor Vhost Einstellungen" auch aktivieren musst, wie @irisdina hier beschrieben hat 

Du gibts leider keinerlei Info darüber, ob du das auch tatsächlich gemacht hast, keinerlei Logs oder sonstwas....

Link to comment
Share on other sites

  • 0

ah okay ups, habe die Config jetzt erstellt. Der Error ist nun weg. Das Zert. ist jedoch immer noch nicht da (ist das normal so?)

Außerdem besteht auch jetzt der Fehler

Diese Website kann keine sichere Verbindung bereitstellen
janis0705.tk hat eine ungültige Antwort gesendet.

mit openssl habe ich gerade ein Zertifikat für Apache erstellt, nun geht es zwar. aber wie ist das normalerweise gedacht? Wie erstellt froxlor für Apache das Zertifikat? 

Link to comment
Share on other sites

  • 0

Komischerweise nicht. habe die Certs mal umbenannt und Apache neu gestartet. folgender Fehler kommt nun beim Ausführen vom Cronjob:

root@root:~# /usr/bin/php -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --force
[error] 91.200.103.227:443 :: certificate file "/etc/apache2/apache2.pem" does not exist! Cannot create ssl-directives
apache2.service is not active, cannot reload.

Der Apache Status sagt

Mai 10 20:26:53 root.janis0705.tk apachectl[27677]: AH00526: Syntax error on line 14 of /etc/apache2/sites-enabled/10_froxlor_ipandport_91.200.103.227.443.conf:
Mai 10 20:26:53 root.janis0705.tk apachectl[27677]: SSLCertificateFile: file '/etc/apache2/apache2.pem' does not exist or is empty
Mai 10 20:26:53 root.janis0705.tk apachectl[27677]: Action 'start' failed.

 

Link to comment
Share on other sites

  • 0

Meinst du die 000-default.conf ? 

<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

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

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

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

 

Link to comment
Share on other sites

  • 0

ahh

# 35_froxlor_normal_vhost_janis0705.tk.conf
# Created 10.05.2019 20:37
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

# Domain ID: 2 - CustomerID: 1 - CustomerLogin: user1
<VirtualHost 91.200.103.227:80>
  ServerName janis0705.tk
  ServerAlias *.janis0705.tk
  ServerAdmin mail@example.com
  DocumentRoot "/var/customers/webs/user1/"
  php_admin_value sendmail_path "/usr/sbin/sendmail -t -f mail@example.com"
  php_admin_value open_basedir "/var/customers/webs/user1:/tmp"
  ErrorLog "/var/customers/logs/user1-error.log"
  CustomLog "/var/customers/logs/user1-access.log" combined
</VirtualHost>

 

Link to comment
Share on other sites

  • 0

Ja ist es. damit erhalte ich :

[information] Updating Let's Encrypt certificates
[information] Updating janis0705.tk
[information] Adding SAN entry: janis0705.tk
[information] Adding SAN entry: www.janis0705.tk
[information] letsencrypt Using 'https://acme-v01.api.letsencrypt.org' to genera                                                                                                                                                                              te certificate
[information] letsencrypt Using existing account key
[information] letsencrypt Starting certificate generation process for domains
[information] letsencrypt Requesting challenge for janis0705.tk
[information] letsencrypt Sending signed request to /acme/new-authz
[information] letsencrypt Got challenge token for janis0705.tk
[information] letsencrypt Token for janis0705.tk saved at /var/www/froxlor/.well                                                                                                                                                                              -known/acme-challenge/H8njL3drd-mJsxzBslhVR3zaOGs_nvp6-boQB_OV5Lg and should be                                                                                                                                                                               available at http://janis0705.tk/.well-known/acme-challenge/H8njL3drd-mJsxzBslhV                                                                                                                                                                              R3zaOGs_nvp6-boQB_OV5Lg
[information] letsencrypt Sending request to challenge
[information] letsencrypt Sending signed request to https://acme-v01.api.letsenc                                                                                                                                                                              rypt.org/acme/challenge/5bmoerVxtc2BpY1TQAjIgKsLNCyWSm2AEF6fSbuGCWo/15705940615
[information] letsencrypt Verification ended with status: valid
[information] letsencrypt Requesting challenge for www.janis0705.tk
[information] letsencrypt Sending signed request to /acme/new-authz
[information] letsencrypt Got challenge token for www.janis0705.tk
[information] letsencrypt Token for www.janis0705.tk saved at /var/www/froxlor/.                                                                                                                                                                              well-known/acme-challenge/4o-Cpq3j4vASY8hF2rYbggLzOEClgLwN7qxltrW0n5A and should                                                                                                                                                                               be available at http://www.janis0705.tk/.well-known/acme-challenge/4o-Cpq3j4vAS                                                                                                                                                                              Y8hF2rYbggLzOEClgLwN7qxltrW0n5A
[information] letsencrypt Sending request to challenge
[information] letsencrypt Sending signed request to https://acme-v01.api.letsenc                                                                                                                                                                              rypt.org/acme/challenge/Mlk_Oakw17OOQZOSgnlSHaR2NsYC1WjB3oonWTyx1dI/15706079190
[information] letsencrypt Verification ended with status: valid
[information] letsencrypt Sending signed request to /acme/new-cert
[information] letsencrypt Got certificate! YAY!
[information] letsencrypt Requesting chained cert at https://acme-v01.api.letsencrypt.org/acme/issuer-cert
[information] letsencrypt Done, returning new certificates and key
[information] Updated Let's Encrypt certificate for janis0705.tk
[information] Let's Encrypt certificates have been updated
[notice] Checking system's last guid

das sieht mir aber nur aus wie das Website-zertifikat, nicht für apache.

Link to comment
Share on other sites

  • 0

jetzt ist sie da :

# 35_froxlor_ssl_vhost_janis0705.tk.conf
# Created 11.05.2019 12:28
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

# Domain ID: 2 (SSL) - CustomerID: 1 - CustomerLogin: user1
<VirtualHost 91.200.103.227:443>
  ServerName janis0705.tk
  ServerAlias www.janis0705.tk
  ServerAdmin gwegew@egewew.de
  SSLEngine On
  SSLProtocol -ALL +TLSv1 +TLSv1.2
  SSLCompression Off
  SSLHonorCipherOrder On
  SSLCipherSuite ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128
  SSLVerifyDepth 10
  SSLCertificateFile /etc/ssl/froxlor-custom/janis0705.tk.crt
  SSLCertificateKeyFile /etc/ssl/froxlor-custom/janis0705.tk.key
  SSLCACertificateFile /etc/ssl/froxlor-custom/janis0705.tk_CA.pem
  SSLCertificateChainFile /etc/ssl/froxlor-custom/janis0705.tk_chain.pem
  <IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=0"
  </IfModule>
  DocumentRoot "/var/customers/webs/user1/"
  php_admin_value sendmail_path "/usr/sbin/sendmail -t -f gwegew@egewew.de"
  php_admin_value open_basedir "/var/customers/webs/user1:/tmp"
  ErrorLog "/var/customers/logs/user1-error.log"
  CustomLog "/var/customers/logs/user1-access.log" combined
</VirtualHost>

die Apache-Zertifikate fehlen aber immer noch. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...