使用SSL证书会在带有apache2的ubuntu上导致ERR_ADDRESS_UNREACHABLE [英] Use of SSL Cert results in ERR_ADDRESS_UNREACHABLE on ubuntu with apache2
本文介绍了使用SSL证书会在带有apache2的ubuntu上导致ERR_ADDRESS_UNREACHABLE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
试图使用从供应商处获得的ssl证书和密钥,但无法正常工作.当我想连接到我的网站时,在Google Chrome浏览器中会收到一个 ERR_ADDRESS_UNREACHABLE
.
Tried to use the ssl cert and key I got from my provider but it's not working out. When I want to connect to my site I get an ERR_ADDRESS_UNREACHABLE
in Google Chrome.
这是我的网站的Apache Config.
Here is my Apache Config for the website.
<VirtualHost *:80>
ServerName example.com
ServerAlias *.example.com
ServerAdmin me@example.com
DocumentRoot /var/www/example.com/public
Redirect "/" "https://example.com/"
ErrorLog ${APACHE_LOG_DIR}/example.com.error.log
CustomLog ${APACHE_LOG_DIR}/example.com.access.log combined
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName example.com
ServerAlias *.example.com
ServerAdmin me@example.com
DocumentRoot /var/www/example.com/public
SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.com.crt
SSLCertificateKeyFile /etc/ssl/private/example.com.key
<Directory /var/www/example.com/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
<Limit POST PUT DELETE>
Require all granted
</Limit>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/example.com.error.log
CustomLog ${APACHE_LOG_DIR}/example.com.access.log combined
</VirtualHost>
</IfModule>
我还确保防火墙允许https连接.
I also ensured that the firewall allowes https connections.
我在这里想念什么?
推荐答案
好,很奇怪,我的服务器上确实未启用ssl/https/port 443.不知道为什么一切都告诉我启用了https,但是这是我可以为我解决的方法.
Ok, so strangely ssl/https/port 443 was indeed NOT enabled on my server. Don't know why everything tells me that https is enabled but here is how I could solve it for me.
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
这篇关于使用SSL证书会在带有apache2的ubuntu上导致ERR_ADDRESS_UNREACHABLE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文