ローカルホストではhttpsを使用できません

ローカルホストではhttpsを使用できません

私のlocalhostテストシステムではhttpsを使用できません。問題を自分で解決できなかったので、次のようにしました。

site-availableのファイルに以下を追加しました:000-default.conf

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug

CustomLog ${APACHE_LOG_DIR}/access.log combined

default-ssl.conf

[default-ssl.conf Pastebin Link][1]

CD /etc/apache2/modsを有効にする

sudo ln -s ../mods-available/rewrite.load rewrite.load

sudo /etc/init.d/apache2 再起動

a2ensiteネイティブSSL

しかし、httpsを使用しようとするときは、次のことをお勧めします。

エラーコード:ERR_CONNECTION_REFUSED

ポート.conf:

Listen 80
<IfModule ssl_module>
    Listen 443
</IfModule>

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

使用すると、openssl s_client -connect localhost:443 </dev/null 以下が提供されます。

connect:接続が拒否されました。 connect:errno=111 では、APache は 443 を受信しませんが、ports.conf に基づいている必要がありますか?

おすすめ?より多くの情報が必要な場合はお知らせください。

修正する:

    [Mon Mar 09 12:01:55.092346 2015] [ssl:info] [pid 7091] AH02200: Loading certificate & private key of SSL-aware server '127.0.1.1:443'
[Mon Mar 09 12:01:55.092520 2015] [ssl:debug] [pid 7091] ssl_engine_pphrase.c(506): AH02249: unencrypted RSA private key - pass phrase not required
[Mon Mar 09 12:01:55.092532 2015] [ssl:debug] [pid 7091] ssl_engine_pphrase.c(181): AH02199: SSL not enabled on vhost 127.0.1.1:80, skipping SSL setup
[Mon Mar 09 12:01:55.092546 2015] [ssl:info] [pid 7091] AH01914: Configuring server 127.0.1.1:443 for SSL protocol
[Mon Mar 09 12:01:55.092658 2015] [ssl:debug] [pid 7091] ssl_engine_init.c(328): AH01893: Configuring TLS extension handling
[Mon Mar 09 12:01:55.092661 2015] [ssl:debug] [pid 7091] ssl_engine_init.c(836): AH02232: Configuring RSA server certificate
[Mon Mar 09 12:01:55.092705 2015] [ssl:warn] [pid 7091] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Mar 09 12:01:55.092731 2015] [ssl:debug] [pid 7091] ssl_util_ssl.c(407): AH02412: [127.0.1.1:443] Cert does not match for name '127.0.1.1' [subject: emailAddress=asd,CN=asd,OU=asd,O=asd,L=ads,ST=asd,C=DE / issuer: emailAddress=asd,C$
[Mon Mar 09 12:01:55.092734 2015] [ssl:warn] [pid 7091] AH01909: RSA certificate configured for 127.0.1.1:443 does NOT include an ID which matches the server name
[Mon Mar 09 12:01:55.092736 2015] [ssl:debug] [pid 7091] ssl_engine_init.c(891): AH02236: Configuring RSA server private key

ベストアンサー1

おすすめ記事