2016-08-02 7 views
0

Ich habe Schwierigkeiten bei der Konfiguration vhosts mit ssl-Zertifikat innerhalb eines Docker-Container (ich glaube nicht, das Problem als etwas mit Docker zu tun), wenn ich eine Verbindung zu meiner Website habe ich keine Fehler, nur eine leere Seite, aber im Fehlerprotokoll mir diese:RSA-Server-Zertifikat apache2

[Tue Aug 02 09:57:58.030690 2016] [ssl:warn] [pid 754] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) 
    [Tue Aug 02 09:57:58.030862 2016] [ssl:warn] [pid 754] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) 

Dies ist der Befehl, den ich gebe mein Schlüsselzertifikat zu erstellen:

sudo openssl req ­-x509 ­-nodes -­days 365 -­newkey rsa:2048 ­-out /etc/ssl/certs/mykey.crt -­keyout /etc/ssl/private/mykey.key 

ich, weil ich zwei Zertifikat erstellen getestet brauche zwei vhosts, aber es funktioniert immer noch nicht, hier ist mein vhost: Server mysite.local

  ServerAdmin [email protected] 
      DocumentRoot /var/www/html/public 

      SetEnv APPLICATION_ENV "devDocker" 

     <Directory /var/www/html/public> 
      Options Indexes FollowSymLinks 
      AllowOverride All 
      Require all granted 
     </Directory> 

     <Location /protected/> 
      AuthTokenSecret  "mySuperSecret" 
      AuthTokenPrefix  /protected/ 
      AuthTokenTimeout  120 
     </Location> 

      ErrorLog ${APACHE_LOG_DIR}/error-scco.log 
      CustomLog ${APACHE_LOG_DIR}/access-scco.log combined 
    </VirtualHost> 

    <VirtualHost *:443> 
      ServerName mysite.local 

      ServerAdmin [email protected] 
      DocumentRoot /var/www/html/public 

      SetEnv APPLICATION_ENV "devDocker" 
     <Directory /var/www/html/public> 
      Options Indexes FollowSymLinks 
      AllowOverride All 
      Require all granted 
     </Directory> 
     <Location /protected/> 
      AuthTokenSecret  "mySuperSecret" 
      AuthTokenPrefix  /protected/ 
      AuthTokenTimeout  120 
     </Location> 

      ErrorLog ${APACHE_LOG_DIR}/error-scco.log 
      CustomLog ${APACHE_LOG_DIR}/access-scco.log combined 
      SSLEngine on 
      SSLCertificateFile /etc/ssl/certs/mykey.crt 
      SSLCertificateKeyFile /etc/ssl/private/mykey.key 
    </VirtualHost> 

    <VirtualHost *:80> 
      ServerName devadmin.mysite.local 

      ServerAdmin [email protected] 
      DocumentRoot /var/www/html/public 

      SetEnv APPLICATION_ENV "devDocker" 

     <Directory /var/www/html/public> 
      Options Indexes FollowSymLinks 
      AllowOverride All 
      Require all granted 
     </Directory> 

     <Location /protected/> 
      AuthTokenSecret  "mySuperSecret" 
      AuthTokenPrefix  /protected/ 
      AuthTokenTimeout  120 
     </Location> 

      ErrorLog ${APACHE_LOG_DIR}/error-scco.log 
      CustomLog ${APACHE_LOG_DIR}/access-scco.log combined 
    </VirtualHost> 

    <VirtualHost *:443> 
      ServerName devadmin.mysite.local 

      ServerAdmin [email protected] 
      DocumentRoot /var/www/html/public 

      SetEnv APPLICATION_ENV "devDocker" 
      SetEnv APPLICATION_WEB_BOOTSTRAP "devadmin" 
     <Directory /var/www/html/public> 
      Options Indexes FollowSymLinks 
      AllowOverride All 
      Require all granted 
     </Directory> 
     <Location /protected/> 
      AuthTokenSecret  "mySuperSecret" 
      AuthTokenPrefix  /protected/ 
      AuthTokenTimeout  120 
     </Location> 

      ErrorLog ${APACHE_LOG_DIR}/error-scco.log 
      CustomLog ${APACHE_LOG_DIR}/access-scco.log combined 
      SSLEngine on 
      SSLCertificateFile /etc/ssl/certs/mykey.crt 
      SSLCertificateKeyFile /etc/ssl/private/mykey.key 
    </VirtualHost> 

ist hier das Protokoll ich habe, wenn ich service apache2 restart Typ:

[Tue Aug 02 09:57:56.950457 2016] [mpm_prefork:notice] [pid 711] AH00169: caught SIGTERM, shutting down 
    [Tue Aug 02 09:57:57.987280 2016] [ssl:warn] [pid 753] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) 
    [Tue Aug 02 09:57:57.987801 2016] [ssl:warn] [pid 753] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366) 
    [Tue Aug 02 09:57:58.030501 2016] [ssl:warn] [pid 754] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) 
    [Tue Aug 02 09:57:58.030933 2016] [ssl:warn] [pid 754] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366) 
    [Tue Aug 02 09:57:58.033677 2016] [mpm_prefork:notice] [pid 754] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.17 OpenSSL/1.0.1f configured -- resuming normal operations 
    [Tue Aug 02 09:57:58.033700 2016] [core:notice] [pid 754] AH00094: Command line: '/usr/sbin/apache2' 

Vielen Dank im Voraus.

+0

Es ist eine Weile her, seit ich mit openssl gesessen habe, also werden Sie wahrscheinlich bald bessere Antworten bekommen. Aber um auf Ihrem Weg bis dahin zu helfen, würde ich vermuten, dass das Problem so ist, wie es heißt: RSA-Server-Zertifikat ist ein CA-Zertifikat. Ich würde das nehmen, da das Zertifikat, das Sie versuchen, auf dem Server zu verwenden, tatsächlich ein CA-Zertifikat ist und verwendet werden sollte, um das Zertifikat zu signieren, das Sie dann auf dem Server verwenden sollten. Einige Informationen: http://www.akadia.com/services/ssh_test_certificate.html – MrApnea

Antwort

0

Dies ist nur eine Warnung, die Sie mit selbstsignierten Zertifikaten erhalten.