Jump to content
Froxlor Forum
  • 0

Apache SSL / SNI


maio

Question

Hallo zusammen,

 

ich m?chte gerne einige Subdomains mitt SSL-Zertifkaten versehen. Und das alles ?ber eine IP.

 

Prinzipiell ist mir klar wie das funktioniert: Ich habe unter IPs und Ports eine IP mit Port 443 angelegt. Unter den Domaineinstellungen des Kunden sind Public und Private Key eingetragen.

 

Nun ist es so, dass immer eine SSL-Error kommt, wenn ich eine SSL-Domain aufrufe.

In Firefox z.B.:

Fehlercode: ssl_error_rx_record_too_long

Nach einigen Recherchen bin ich darauf gekommen, dass ein falscher/ anderer vHost die Domain abgereift.

 

In der other_vhosts_access.log bin ich darauf gekommen, dass es der eigene Server-Host ist, auf dem auf Froxlor l?ut.

server.domain.net:80 333.333.333.333 - - [13/Sep/2014:22:32:19 +0200] "\x16\x03" 501 298 "-" "-"
server.domain.net:80 333.333.333.333 - - [13/Sep/2014:22:34:21 +0200] "\x16\x03\x01" 501 299 "-" "-"

Wenn ich nun aus /etc/apache2/sites-enabled/ alle conf-Dateien entferne die mir 10_ anfangen, dann komme ich auf meine Domains ?ber https.

 

Ich hoffe, ich konnte meine Problem halbwegs darstellen :D

 

Mir stellt sich die Frage, wie ich Froxlor nun "richtig" konfigieren kann/ muss, dass das alles l?uft?!

 

Viele Gr??e,

maio

 

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Hallo,

ich hab noch eine default-ssl conf-Datei mit folgendem Inhalt:

 

<VirtualHost _default_:443>
        SSLStrictSNIVHostCheck off
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www
</VirtualHost>

Wichtig dabei ist der Eintrag:

SSLStrictSNIVHostCheck off

 

Ausserdem musst du aufpassen, es m?ssen bestimmte Software-Versionen installiert sein.
Welche genau kann ich dir auf anhieb leider nicht sagen, aber Google wei? da mehr ;)

 

Gruss

cardman

Link to comment
Share on other sites

Hallo zusammen,

 

nach nochmaligen einigem hin und her konnte ich nun feststellen, dass ?ber https immer der erste vHost in 'sites-enabled' angesprochen wird. ?ber http jeweils der richtige.

 

Warum das so ist, kann ich mir leider nicht erkl?ren... Die vHosts sind alle ok und der Eintrag ServerName ist ?berall gesetzt.

 

Wenn ich nun z.B.  21_froxlor_ssl_vhost_webmail.domain.net.conf zu 00_froxlor_ssl_vhost_webmail.domain.net.conf umbenenne, dann klappt es wie es soll.

 

Wie kann das kommen?

 

vHost:

# 21_froxlor_ssl_vhost_webmail.domain.net.conf
# Created 14.09.2014 20:40
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

# Domain ID: 4 (SSL) - CustomerID: 1 - CustomerLogin: media
<VirtualHost 12.34.56.789:443>
  ServerName webmail.domain.net
  ServerAdmin info@domain.de
  SSLEngine On
  SSLHonorCipherOrder On
  SSLCipherSuite ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH
  SSLVerifyDepth 10
  SSLCertificateFile /etc/ssl/froxlor-custom/webmail.domain.net.crt
  SSLCertificateKeyFile /etc/ssl/froxlor-custom/webmail.domain.net.key
  DocumentRoot "/var/customers/webs/media/webmail.domain.net/"
  FastCgiExternalServer /var/www/php-fpm/media/webmail.domain.net/ssl-fpm.external -socket /var/lib/apache2/fastcgi/media-webmail.domain.net-php-fpm.socket -idle-time$
  <Directory "/var/customers/webs/media/webmail.domain.net/">
    <FilesMatch "\.php$">
      SetHandler php5-fastcgi
      Action php5-fastcgi /fastcgiphp
      Options +ExecCGI
    </FilesMatch>
    Order allow,deny
    allow from all
  </Directory>
  Alias /fastcgiphp /var/www/php-fpm/media/webmail.domain.net/ssl-fpm.external
  Alias /awstats "/var/customers/webs/media/awstats/webmail.domain.net"
  Alias /awstats-icon "/usr/share/awstats/icon/"
  ErrorLog "/var/customers/logs/media-webmail.domain.net-error.log"
  CustomLog "/var/customers/logs/media-webmail.domain.net-access.log" combined
</VirtualHost>

Gr??e

Link to comment
Share on other sites

Hi,

 

beide defaults sind deaktiviert.

 

Meine ports.conf ist aus ok:

Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

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

SSL Module ist aktiviert.

 

SSL.conf sieht mir auch nicht verkehrt aus:

<IfModule mod_ssl.c>
#
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. This means you then cannot use the /dev/random device
# because it would lead to very long connection times (as long as
# it requires to make more entropy available). But usually those
# platforms additionally provide a /dev/urandom device which doesn't
# block. So, if available, use this one instead. Read the mod_ssl User
# Manual for more details.
#
SSLRandomSeed startup builtin
SSLRandomSeed startup file:/dev/urandom 512
SSLRandomSeed connect builtin
SSLRandomSeed connect file:/dev/urandom 512

##
##  SSL Global Context
##
##  All SSL configuration in this context applies both to
##  the main server and all SSL-enabled virtual hosts.
##

#
#   Some MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

#   Pass Phrase Dialog:
#   Configure the pass phrase gathering process.
#   The filtering dialog program (`builtin' is a internal
#   terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog  builtin

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism
#   to use and second the expiring timeout (in seconds).
#   (The mechanism dbm has known memory leaks and should not be used).
#SSLSessionCache         dbm:${APACHE_RUN_DIR}/ssl_scache
SSLSessionCache        shmcb:${APACHE_RUN_DIR}/ssl_scache(512000)
SSLSessionCacheTimeout  300

#   Semaphore:
#   Configure the path to the mutual exclusion semaphore the
#   SSL engine uses internally for inter-process synchronization.
SSLMutex  file:${APACHE_RUN_DIR}/ssl_mutex

#   SSL Cipher Suite:
#   List the ciphers that the client is permitted to negotiate. See the
#   ciphers(1) man page from the openssl package for list of all available
#   options.
#   Enable only secure ciphers:
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5

#   Speed-optimized SSL Cipher configuration:
#   If speed is your main concern (on busy HTTPS servers e.g.),
#   you might want to force clients to specific, performance
#   optimized ciphers. In this case, prepend those ciphers
#   to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
#   Caveat: by giving precedence to RC4-SHA and AES128-SHA
#   (as in the example below), most connections will no longer
#   have perfect forward secrecy - if the server's key is
#   compromised, captures of past or future traffic must be
#   considered compromised, too.
#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
#SSLHonorCipherOrder on

# enable only secure protocols: SSLv3 and TLSv1, but not SSLv2
SSLProtocol all -SSLv2

# Allow insecure renegotiation with clients which do not yet support the
# secure renegotiation protocol. Default: Off
#SSLInsecureRenegotiation on

# Whether to forbid non-SNI clients to access name based virtual hosts.
# Default: Off
SSLStrictSNIVHostCheck Off

</IfModule>

An der apache.conf habe ich nichts ge?ndert.

Link to comment
Share on other sites

Ist das vllt Apache-2.4? Also das die Reihenfolge eine Rolle spielt ist korrekt. Aber er geht normal immer auf den Hostname bevor er auf die IP/Port zur?ckf?llt. Und du hast ja auch eine SSL Fehlermeldung wie ich lese - das solltest du vllt zun?chst beheben und dann schauen ob es immernoch ein Problem ist.

Link to comment
Share on other sites

Habe Apache2.2

apache2 -version
Server version: Apache/2.2.22 (Debian)
Server built:   Jul 24 2014 15:34:03

Die SSL-Fehler aus meinem ersten Post treten nur auf, wenn versucht wird ?ber Port 80 auf SSL zuzugreifen. So habe ich es mehrmals ?ber Google herausfinden k?nnen. Die sind auch weg, sobald der richtige vHost ins Spiel kommt - also wenn ich z.B.  21_froxlor_ssl_vhost_webmail.domain.net.conf zu zu 00_froxlor_ssl_vhost_webmail.domain.net.conf umbenenne.

 

Leider konnte ich nach 2 Tagen keine L?sung finden und an dem Verhalten nichts ?ndern. Daher mein Topic hier, weil ich einfach nicht mehr weiter wei?.

Link to comment
Share on other sites

Der Fehler kam als du via Port 80 auf SSL zugreifen wolltest...wie ist das bitte m?glich? Hast du in Froxlor Port 80 als SSL-Port definiert? Oder wie? Also irgendwas ist da bei dir komisch. Nopaste bitte folgende Dateien:

/etc/apache2/sites-enabled/10_*.conf

Dazu bitte ein Screenshot deiner IP/Port Einstellungen (Admin: Overview der IP/Ports sollte reichen). Und am besten eigentlich "reale" domains, damit ich das mal mittesten kann. Gerne auch via PM falls du da keine Domains preisgeben m?chtest.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...