我有一个运行在Raspberry Pi上的Web服务器。 我在443端口运行stunnel,所以我一直在努力把我的web服务器移动到端口8443 。 我使用Let's Encrypt (Certbot)来获得我的SSL证书,之前他们一直在完美地工作。
我已经学会了如何使用DNS挑战获取证书,因此不再需要使用端口443进行身份validation。 我相信我所有的configuration文件设置正确,但我会在下面插入它们。
Apache正在运行,什么都不应该与它冲突,但是当我试图通过HTTPS访问我的网站时,Chrome就表示网站意外地closures了连接,而Edge说它使用过时或不安全的TLS设置。
我一直在试图找出自己的,但在这一点上,我不知道该怎么做。
# If you just change the port or add more ports here, you will likely also' # have to change the VirtualHost statement in' # /etc/apache2/sites-enabled/000-default.conf' Listen 80 #<IfModule ssl_module>' # Listen 8443' #</IfModule>' #<IfModule mod_gnutls.c>' # Listen 8443' #</IfModule>' # vim: syntax=apache ts=4 sw=4 sts=4 sr noet' <IfModule mod_ssl.c> Listen 8443 </Ifmodule>
样品VHostconfiguration
<IfModule mod_ssl.c> <VirtualHost *:8443> ServerName mysite.tld ServerAdmin [email protected] DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLCertificateFile /etc/letsencrypt/live/mysite.tld/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/mysite.tld/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf </VirtualHost> </IfModule>
默认HTTPconfiguration,供参考
<VirtualHost *:80> ServerName mysite.tld ServerAdmin [email protected] DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Redirect permanent / https://mysite.tld/ RewriteEngine on RewriteCond %{SERVER_NAME} =mysite.tld RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] </VirtualHost>
确认您正在使用浏览器连接到端口8443。
确认它实际上是由apache处理的,而不是其他进程监听那个不提供SSL的端口。
确认SSL正在运行并侦听端口8443。
我没有看到你的代码片段中的SSLEngine On 。 这也可能会导致你的问题。