2017-02-20 7 views
1

私は、ストライプ支払いゲートウェイが必要なウェブサイトを構築しようとしており、SSLが必要です。 Windows 10でXAMPPを使用しています。SSL証明書と鍵ペアを生成してApacheにインストールした後、Apacheはもはや起動しません。自己署名入りSSL証明書がインストールされているため、Apacheは起動しません

いくつかのエラーメッセージと設定を添付しています。助けてください。

これはApacheのエラーログに表示されるメッセージです。これらのエラーメッセージは再現されません。何か変わったはずです。私は証明書と鍵を別の方法で生成しようとしたと思います。しかし、Apacheはまだ起動しません。

[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] AH02577: Init: SSLPassPhraseDialog builtin is not supported on Win32 (key file C:/xampp/apache/conf/ssl.key/server.key) 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] AH02311: Fatal error initialising mod_ssl, exiting. See C:/xampp/apache/logs/error.log for more information 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] AH02564: Failed to configure encrypted (?) private key www.loc1.dev:443:0, check C:/xampp/apache/conf/ssl.key/server.key 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=RSA) 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:04093004:rsa routines:OLD_RSA_PRIV_DECODE:RSA lib 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag 
[Sun Feb 19 15:45:25.312250 2017] [ssl:emerg] [pid 6508:tid 556] SSL Library Error: error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO) 
AH00016: Configuration Failed 

これは、コマンドラインからApacheを起動しようとしたときに発生するエラーです。

Apache 2 is starting ... 
AH00548: NameVirtualHost has no effect and will be removed in the next release C:/xampp/apache/conf/extra/httpd-vhosts.conf:26 
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : AH00072: make_sock: could not bind to address [::]:443 
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : AH00072: make_sock: could not bind to address 0.0.0.0:443 
AH00451: no listening sockets available, shutting down 
AH00015: Unable to open logs 

ここは、XAMPPコントロールダイアログに表示されたエラーです。

1:16:13 PM [Apache] Error: Apache shutdown unexpectedly. 
1:16:13 PM [Apache] This may be due to a blocked port, missing dependencies, 
1:16:13 PM [Apache] improper privileges, a crash, or a shutdown by another method. 
1:16:13 PM [Apache] Press the Logs button to view error logs and check 
1:16:13 PM [Apache] the Windows Event Viewer for more clues 
1:16:13 PM [Apache] If you need more help, copy and post this 
1:16:13 PM [Apache] entire log window on the forums 

これはhttpd-vhosts.confの内容です。私はloc1.devのSSLをセットアップしようとしています。

<VirtualHost *:80> 
    DocumentRoot "C:/xampp/htdocs" 
    ServerName localhost 
</VirtualHost> 

<VirtualHost *:80> 
    DocumentRoot "C:/xampp/htdocs/loc.com/public_html" 
    ServerName loc.dev 
    ServerAlias www.loc.dev 
    <Directory "C:/xampp/htdocs/loc.com/public_html"> 
    AllowOverride All 
    Require all Granted 
    </Directory> 
</VirtualHost> 

<VirtualHost *:80> 
    DocumentRoot "C:/xampp/htdocs/loc1.com/public_html" 
    ServerName loc1.dev 
    ServerAlias www.loc1.dev 
    <Directory "C:/xampp/htdocs/loc1.com/public_html"> 
    AllowOverride All 
    Require all Granted 
    </Directory> 
</VirtualHost> 

<VirtualHost *:80> 
    DocumentRoot "C:/xampp/htdocs/foodharbor.org/public_html" 
    ServerName foodharbor.dev 
    ServerAlias www.foodharbor.dev 
    <Directory "C:/xampp/htdocs/foodharbor.org/public_html"> 
    AllowOverride All 
    Require all Granted 
    </Directory> 
</VirtualHost> 

これは私が私のhostsファイルにあるもののhttpd-ssl.confの

<VirtualHost _default_:443> 

# General setup for the virtual host 
DocumentRoot "C:/xampp/htdocs/loc1.com/public_html" 
ServerName www.loc1.dev 
ServerAdmin [email protected] 
ErrorLog "C:/xampp/apache/logs/error.log" 
TransferLog "C:/xampp/apache/logs/access.log" 
SSLEngine on 
SSLCertificateFile "conf/ssl.crt/server.crt" 
SSLCertificateKeyFile "conf/ssl.key/server.key" 

</VirtualHost>  

これはあるに持っているものです(C:\ WINDOWS \ System32 \ Drivers \ Etc \ Hostsに)。

127.0.0.1 localhost 
127.0.0.1 loc.dev 
127.0.0.1 loc1.dev 
127.0.0.1 foodharbor.dev 

何か不足していますか?

答えて

0

httpd-ssl.conf(C:\ xampp \ apache \ conf \ extra)のListen 443をコメントアウトしました。これでApacheが起動し、このサイトはhttpsとhttpで利用可能になりました。他の場所でApacheが443を聞くよう指示しているはずです...

# 
# When we also provide SSL we have to listen to the 
# standard HTTP port (see above) and to the HTTPS port 
# 
#Listen 443 
関連する問題