San*_*ngh 6 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>
Run Code Online (Sandbox Code Playgroud)
这是我的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>
Run Code Online (Sandbox Code Playgroud)
每件事都运转良好。我不知道为什么这个警告每天都会出现在我的 apache 日志文件中,我该如何解决它?
通常,这是因为您在端口 443 上的虚拟主机上没有任何 SSL 配置。您可能需要启用“SSLEngine on”并提供证书信息。该警告表明正在通常的 HTTPS 端口上提供常规 HTTP 流量。
归档时间: |
|
查看次数: |
16149 次 |
最近记录: |