SSL:评估失败:无法连接到服务器(Apache2,Ubuntu)

SSL:评估失败:无法连接到服务器(Apache2,Ubuntu)

我是新来的。我一直在尝试使用 Apache2 在 Ubuntu 20.04 上安装 SSL 证书。该证书是来自 Sectigo/Comodo 的正面 SSL。在 SSLllabs 上测试时,我收到评估失败:无法连接到服务器。Immuniweb 显示“HTTPS 端口 (443) 已关闭,但 HTTP 端口 (80) 已打开。可以拦截与远程 Web 服务器的数据交换。”

$ apache2ctl configtest 输出“语法正常”。$ service apache2 restart 输出:“apache2.service 的作业失败,因为控制进程以错误代码退出。有关详细信息,请参阅“systemctl status apache2.service”和“journalctl -xe”。此消息在 $ sudo a2dissite 之后消失。我打开了防火墙到端口 80 和 443。我的配置文件:

<VirtualHost *:443>
# The ServerName directive (...)

ServerAdmin webmaster@localhost
DocumentRoot /var/www/ps-photo.net/html
ServerName ps-photo.net
ServerAlias www.ps-photo.net    
SSLEngine on
SSLCertificateKeyFile /etc/apache2/ssl/private/ps-photo_net.key
SSLCertificateFile /etc/apache2/ssl/ps-photo_net.crt
SSLCertificateChainFile /etc/apache2/ssl/ssl-bundle.crt


# Available loglevels: (...)

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/ (...)
</VirtualHost>

<VirtualHost *:80>
  ServerName ps-photo.net
  ServerAlias www.ps-photo.net
  Redirect permanent / https:///
   </VirtualHost>

$ netstat -anutp | grep :443 结果:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 192.168.86.47:52130     216.58.211.2:443        TIME_WAIT   -                   
tcp        0      0 192.168.86.47:52098     216.58.211.2:443        ESTABLISHED 3314/firefox        
tcp        0      0 192.168.86.47:44654     143.204.55.34:443       TIME_WAIT   -                   
tcp        0      0 192.168.86.47:36284     91.228.74.198:443       TIME_WAIT   -                   
tcp        0      0 192.168.86.47:52104     216.58.211.2:443        ESTABLISHED 3314/firefox        
tcp        0      0 192.168.86.47:56528     143.204.55.115:443      ESTABLISHED 3314/firefox        
tcp        0      0 192.168.86.47:48606     192.0.73.2:443          ESTABLISHED 3314/firefox    

任何提示都将不胜感激。我对此完全陌生。

最好的,彼得

相关内容