lets encrypt problem

  • Thread starter Thread starter Stevenpiel92
  • Start date Start date
S

Stevenpiel92

Guest
hallo, habe gerade lets encrypt installiert und meine domain eingerichtet... erfolgreich:

Code:
Congratulations! Your certificate and chain have been saved at
   /etc/letsencrypt/live/***.de/fullchain.pem

doch wieso ist die Seite immer noch nicht mit https erreichbar? was muss ich noch tun?
 
Ohne substantielle Infos wird das nur blindes Herumraten.

was muss ich noch tun?

Infos nachliefern.
Welches Betriebssystem, welcher Webserver wird verwendet? Wird ein Adminpanel (Plesk o.ä.) eingesetzt? Wie sieht die Webserverkonfiguration für die entsprechende Domain aus? Was sagen die relevanten Logfiles zum Zeitpunkt des Aufrufversuchs über HTTPS?
 
debian 8 und apache. teste das ganze gerade auf einem neu aufgesetzten server daher ist eine testseite einfach in /var/www/html/ . Rufe ich die seite auf sehe ich halt das :

Code:
Diese Website ist nicht erreichbar

X.de hat die Verbindung abgelehnt.

in der access.log in var/log/apache2/ steht nichts
 
Wie sieht die Webserverkonfiguration für die entsprechende Domain aus?

Wenn ich jetzt raten müßte, würde ich vermuten, daß die HTTPS-Konfiguration für die Domain unvollständig, fehlerhaft oder noch garnicht vorhanden ist...
 
was genau meinst du denn damit? wie muss ich die https Konfiguration einstellen?
 
Last edited by a moderator:
habe gerade das hier gemacht: http://www.tecchannel.de/a/owncloud-9-unter-ubuntu-server-16-04-lts-installieren,3277807,2

nun will apache nicht mehr starten:

Code:
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.

service apache2 status:

Code:
root@root599046:/opt/letsencrypt# service apache2 status
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─forking.conf
   Active: failed (Result: exit-code) since Sun 2017-03-26 15:40:55 CEST; 25s ago
  Process: 4545 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 4094 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
  Process: 4686 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Mar 26 15:40:55 root599046.kms4.cc apache2[4686]: Starting web server: apache2 failed!
Mar 26 15:40:55 root599046.kms4.cc apache2[4686]: The apache2 configtest failed. ... (warning).
Mar 26 15:40:55 root599046.kms4.cc apache2[4686]: Output of config test was:
Mar 26 15:40:55 root599046.kms4.cc apache2[4686]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 4 of /etc/apache2/sites-enabled/default-...ied modules
Mar 26 15:40:55 root599046.kms4.cc apache2[4686]: Action 'configtest' failed.
Mar 26 15:40:55 root599046.kms4.cc apache2[4686]: The Apache error log may have more information.
Mar 26 15:40:55 root599046.kms4.cc systemd[1]: apache2.service: control process exited, code=exited status=1
Mar 26 15:40:55 root599046.kms4.cc systemd[1]: Failed to start LSB: Apache2 web server.
Mar 26 15:40:55 root599046.kms4.cc systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.


mache ich die Änderungen in der default-ssl.conf rückgängig startet apache wieder aber sehe immer noch was rotes bei service apache2 status :

Code:
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─forking.conf
   Active: active (running) since Sun 2017-03-26 15:42:24 CEST; 6s ago
  Process: 4545 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 4094 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
  Process: 4740 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/apache2.service
           ├─4754 /usr/sbin/apache2 -k start
           ├─4757 /usr/sbin/apache2 -k start
           └─4758 /usr/sbin/apache2 -k start

Mar 26 15:42:23 root599046.kms4.cc apache2[4740]: Starting web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using ro...his message
Mar 26 15:42:24 root599046.kms4.cc apache2[4740]: .
Mar 26 15:42:24 root599046.kms4.cc systemd[1]: Started LSB: Apache2 web server.
Hint: Some lines were ellipsized, use -l to show in full.


Er meckert ja bei der zeile 219 in der apache config, entferne ich einfach diese zeile startet apache aber wie beim code zuvor mit dem einen error :

Code:
Process: 4094 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)

Diese Zeile ist das die ich entfernt habe :

Code:
IncludeOptional sites-enabled/*.conf

mache ich was falsch ? ^^
 
Last edited by a moderator:
also die apache2.conf ?

HTML:
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
Mutex file:${APACHE_LOCK_DIR} default

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all denied
</Directory>

<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>

#<Directory /srv/>
#	Options Indexes FollowSymLinks
#	AllowOverride None
#	Require all granted
#</Directory>




# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
 
default-ssl.conf :

HTML:
<IfModule mod_ssl.c>
	<VirtualHost _default_:443>
		ServerAdmin webmaster@localhost
		<IfModule mod_headers.c>Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"</IfModule>

		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

		#   SSL Engine Switch:
		#   Enable/Disable SSL for this virtual host.
		SSLEngine on
		SSLCertificateFile /etc/apache2/ssl/apache.crtSSLCertificateKeyFile /etc/apache2/ssl/apache.key

		#   A self-signed (snakeoil) certificate can be created by installing
		#   the ssl-cert package. See
		#   /usr/share/doc/apache2/README.Debian.gz for more info.
		#   If both key and certificate are stored in the same file, only the
		#   SSLCertificateFile directive is needed.
		#   SSLCertificateFile	/etc/ssl/certs/ssl-cert-snakeoil.pem
		#   SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

		#   Server Certificate Chain:
		#   Point SSLCertificateChainFile at a file containing the
		#   concatenation of PEM encoded CA certificates which form the
		#   certificate chain for the server certificate. Alternatively
		#   the referenced file can be the same as SSLCertificateFile
		#   when the CA certificates are directly appended to the server
		#   certificate for convinience.
		#SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt

		#   Certificate Authority (CA):
		#   Set the CA certificate verification path where to find CA
		#   certificates for client authentication or alternatively one
		#   huge file containing all of them (file must be PEM encoded)
		#   Note: Inside SSLCACertificatePath you need hash symlinks
		#		 to point to the certificate files. Use the provided
		#		 Makefile to update the hash symlinks after changes.
		#SSLCACertificatePath /etc/ssl/certs/
		#SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt

		#   Certificate Revocation Lists (CRL):
		#   Set the CA revocation path where to find CA CRLs for client
		#   authentication or alternatively one huge file containing all
		#   of them (file must be PEM encoded)
		#   Note: Inside SSLCARevocationPath you need hash symlinks
		#		 to point to the certificate files. Use the provided
		#		 Makefile to update the hash symlinks after changes.
		#SSLCARevocationPath /etc/apache2/ssl.crl/
		#SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl

		#   Client Authentication (Type):
		#   Client certificate verification type and depth.  Types are
		#   none, optional, require and optional_no_ca.  Depth is a
		#   number which specifies how deeply to verify the certificate
		#   issuer chain before deciding the certificate is not valid.
		#SSLVerifyClient require
		#SSLVerifyDepth  10

		#   SSL Engine Options:
		#   Set various options for the SSL engine.
		#   o FakeBasicAuth:
		#	 Translate the client X.509 into a Basic Authorisation.  This means that
		#	 the standard Auth/DBMAuth methods can be used for access control.  The
		#	 user name is the `one line' version of the client's X.509 certificate.
		#	 Note that no password is obtained from the user. Every entry in the user
		#	 file needs this password: `xxj31ZMTZzkVA'.
		#   o ExportCertData:
		#	 This exports two additional environment variables: SSL_CLIENT_CERT and
		#	 SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
		#	 server (always existing) and the client (only existing when client
		#	 authentication is used). This can be used to import the certificates
		#	 into CGI scripts.
		#   o StdEnvVars:
		#	 This exports the standard SSL/TLS related `SSL_*' environment variables.
		#	 Per default this exportation is switched off for performance reasons,
		#	 because the extraction step is an expensive operation and is usually
		#	 useless for serving static content. So one usually enables the
		#	 exportation for CGI and SSI requests only.
		#   o OptRenegotiate:
		#	 This enables optimized SSL connection renegotiation handling when SSL
		#	 directives are used in per-directory context.
		#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
		<FilesMatch "\.(cgi|shtml|phtml|php)$">
				SSLOptions +StdEnvVars
		</FilesMatch>
		<Directory /usr/lib/cgi-bin>
				SSLOptions +StdEnvVars
		</Directory>

		#   SSL Protocol Adjustments:
		#   The safe and default but still SSL/TLS standard compliant shutdown
		#   approach is that mod_ssl sends the close notify alert but doesn't wait for
		#   the close notify alert from client. When you need a different shutdown
		#   approach you can use one of the following variables:
		#   o ssl-unclean-shutdown:
		#	 This forces an unclean shutdown when the connection is closed, i.e. no
		#	 SSL close notify alert is send or allowed to received.  This violates
		#	 the SSL/TLS standard but is needed for some brain-dead browsers. Use
		#	 this when you receive I/O errors because of the standard approach where
		#	 mod_ssl sends the close notify alert.
		#   o ssl-accurate-shutdown:
		#	 This forces an accurate shutdown when the connection is closed, i.e. a
		#	 SSL close notify alert is send and mod_ssl waits for the close notify
		#	 alert of the client. This is 100% SSL/TLS standard compliant, but in
		#	 practice often causes hanging connections with brain-dead browsers. Use
		#	 this only for browsers where you know that their SSL implementation
		#	 works correctly.
		#   Notice: Most problems of broken clients are also related to the HTTP
		#   keep-alive facility, so you usually additionally want to disable
		#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
		#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
		#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
		#   "force-response-1.0" for this.
		BrowserMatch "MSIE [2-6]" \
				nokeepalive ssl-unclean-shutdown \
				downgrade-1.0 force-response-1.0
		# MSIE 7 and newer should be able to use keepalive
		BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

	</VirtualHost>
</IfModule>

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

bei der zeile bin ich mir nicht sicher:

Code:
SSLCertificateFile /etc/apache2/ssl/apache.crtSSLCertificateKeyFile /etc/apache2/ssl/apache.key

soll da eine neue Zeile hin vor /etc/apache2/ssl/apache.key ? außerdem, warum dieser pfad wenn es diese Datei nicht gibt? /etc/apache2/ssl/apache.crtSSLCertificateKeyFile

entferne ich dieses IfModule ganz oben kommt dann nämlich der fehler dass es diese DAtei net gibt...


ports.cfg :

HTML:
# 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 80

<IfModule ssl_module>
	Listen 443
</IfModule>

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

<IfModule mod_ssl.c>
     Listen 443
 </IfModule>

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


und hier der ganze error beim starten von apach2:

HTML:
root@root599046:/etc# systemctl status apache2.service -l
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─forking.conf
   Active: failed (Result: exit-code) since Sun 2017-03-26 18:27:08 CEST; 9min ago
  Process: 4328 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 4795 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Mar 26 18:27:08 root599046.kms4.cc apache2[4795]: Starting web server: apache2 failed!
Mar 26 18:27:08 root599046.kms4.cc apache2[4795]: The apache2 configtest failed. ... (warning).
Mar 26 18:27:08 root599046.kms4.cc apache2[4795]: Output of config test was:
Mar 26 18:27:08 root599046.kms4.cc apache2[4795]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 4 of /etc/apache2/sites-enabled/default-ssl.conf: <IfModule takes one argument, Container for directives based on existence of specified modules
Mar 26 18:27:08 root599046.kms4.cc apache2[4795]: Action 'configtest' failed.
Mar 26 18:27:08 root599046.kms4.cc apache2[4795]: The Apache error log may have more information.
Mar 26 18:27:08 root599046.kms4.cc systemd[1]: apache2.service: control process exited, code=exited status=1
Mar 26 18:27:08 root599046.kms4.cc systemd[1]: Failed to start LSB: Apache2 web server.
Mar 26 18:27:08 root599046.kms4.cc systemd[1]: Unit apache2.service entered failed state.
 
Last edited by a moderator:
Du musst die VHost-SSL-Config entsprechend anpassen, sodass der Apache dein LetsEncrypt-Zertifikat nutzt.

Vorerst solltest du dir aber wohl lieber die Grundlegenden Dinge der Serveradministration privat, auf einer VM aneignen.
 
ok das ifModule muss in 3 Zeilen so sein :

Code:
		<ifmodule mod_headers.c="">
		Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" env=HTTPS
		</ifmodule>

doch jetzt kommt das halt:

Code:
Mar 26 20:18:58 root599046.kms4.cc apache2[5419]: AH00526: Syntax error on line 29 of /etc/apache2/sites-enabled/default-ssl.conf:
Mar 26 20:18:58 root599046.kms4.cc apache2[5419]: SSLCertificateFile: file '/etc/apache2/ssl/apache.crtSSLCertificateKeyFile' does not exist or is empty


sind das nicht die 2 pfade für lets encrypt (openssl wars im tutorial da) ?

Code:
SSLCertificateFile /etc/letsencrypt/live/DOMAIN.de/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/DOMAIN.de/privkey.pem

erhalte jetzt:

Code:
Mar 26 20:27:57 root599046.kms4.cc apache2[5571]: Starting web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using root599046.kms4.cc. Set the 'ServerName' directive globally to suppress this message
Mar 26 20:27:57 root599046.kms4.cc apache2[5571]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
Mar 26 20:28:17 root599046.kms4.cc apache2[5571]: failed!
Mar 26 20:28:17 root599046.kms4.cc apache2[5571]: The apache2 instance did not start within 20 seconds. Please read the log files to discover problems ... (warning).
Mar 26 20:28:17 root599046.kms4.cc systemd[1]: apache2.service: control process exited, code=exited status=1
Mar 26 20:28:17 root599046.kms4.cc systemd[1]: Failed to start LSB: Apache2 web server.
Mar 26 20:28:17 root599046.kms4.cc systemd[1]: Unit apache2.service entered failed state.
 
Last edited by a moderator:
Liest Du eigentlich die Fehlermeldungen?

Hausaufgabe 1: Fehlermeldung auf Deutsch übersetzen
Hausaufgabe 2: Übersetzte Fehlermeldung bei Google eingeben
Hausaufgabe 3: Ergebnisse der beiden vorigen Hausaufgaben hier posten
 
Bei der Anmeldung an das SSF sollten ein paar Fragen über Linux gestellt werden.
 
ich will das ganze jetzt mit froxlor machen - woher bekomme ich aber das ssl zertifikat für apache2 ? in froxlor ist der beispielpfad /etc/apache2/apache2.pem und /etc/apache2/apache2.key
 
Back
Top