我有一个无法在SSL证书上正常运行的网站。
网站在我的配置文件中使用SSLEngine off
指令在443端口上正常工作,其中SSLEngine on
响应503错误。
默认情况下,它也连接在端口80上,我真的不知道该在哪里更改,因为到处都设置了端口443。
.htaccess文件:
RewriteEngine On
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ https://www.antoszbk.xyz/$1 [R,L]
配置文件(正常工作时):
<VirtualHost *:443>
ServerAdmin xxx@xxx.com
DocumentRoot /var/www/html/index.html
ServerName antoszbk.xyz
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine off
SSLCertificateFile /etc/ssl/certs/www.antoszbk.xyz.csr
SSLCertificateKeyFile /etc/ssl/private/www.antoszbk.xyz.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
答案 0 :(得分:0)
解决方案在DNS服务器配置中。
提供者给我的证书被设置为antoszbk.xyz
别名,但在我的SSL配置中,我将其设置为www.antoszbk.xyz
。如果尝试通过IPv6(AAAA记录)重定向进行连接,仍然会收到错误消息,但是DNS处理它是一个时间问题。