尝试使用我从我的提供商处获得的ssl证书和密钥,但它没有成功。当我想要连接到我的网站时,我会在Google Chrome中获得ERR_ADDRESS_UNREACHABLE
。
这是我的网站Apache Config。
<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连接。
我在这里缺少什么?
答案 0 :(得分:1)
好的,奇怪的是ssl / https / port 443确实没有在我的服务器上启用。不知道为什么一切都告诉我https已启用,但这就是我可以为我解决的问题。
iptables -I INPUT -p tcp --dport 443 -j ACCEPT