linux - 您在标准 HTTP(80) 端口上配置了 HTTPS(443)

标签 linux apache ubuntu ssl

在我的 apache 错误日志中,我有一堆 ssl 警告保存 You configured HTTPS(443) on the standard HTTP(80) port!

这是我的 site.ca.conf 文件

<VirtualHost *:80>
  ServerName site.ca:80
  DocumentRoot "/var/www/site/public"
  <Directory "/var/www/site/public">
    AllowOverride all
  </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =site.ca
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

这是我的 site.ca-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
  ServerName site.ca:80
  DocumentRoot "/var/www/site/public"
  <Directory "/var/www/site/public">
    AllowOverride all
  </Directory>
ServerAlias site.ca
SSLCertificateFile /etc/letsencrypt/live/site.ca/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/site.ca/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

一切正常。我不确定为什么这个警告每天都出现在我的 Apache 日志文件中,我该如何解决?

最佳答案

一般来说,这是因为您在虚拟主机的443端口上没有任何SSL配置。您可能需要启用“SSLEngine on”并提供证书信息。该警告表明正在为通常为 HTTPS 端口的常规 HTTP 流量提供服务。

关于linux - 您在标准 HTTP(80) 端口上配置了 HTTPS(443),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59605857/

相关文章:

linux - 是否可以在 linux 中为用户设置环境变量?

linux - WX_CONFIG_OPTIONS : command not found

regex - 如何将 sed 与正则表达式一起使用

linux - 嵌套最深的可写文件夹?

apache - 无法上传 ssl 私钥解析

php - Apache Mod 为 Laravel 重写

python - 除了请求库之外,如何使用 Python 脚本从 url 获取 json 数据?

python-2.7 - 从脚本运行 ffmpeg 命令时没有这样的文件或目录

sql-server - 在 Linux 上使用窗口身份验证的 Sqoop 和 MSSQL 失败

linux - 为什么我无法在 NASM Assembly 中打印我的数字常量?