这篇文章非常接近我正在寻找的内容。但我正在寻找的是
letsencrypt.example.com should always be http
*.example.com should always be https
使用这篇文章中的解决方案,我可以通过以下方式将所有 http 重写为 https
server {
listen 80;
server_name test.example.com;
rewrite ^ https://$http_host$request_uri? permanent;
}
然后再做
server {
listen 443 ssl;
...
问题
但是我怎样才能确保它letsencrypt.example.com
仍然在 http 端口 80?