我需要帮助,因为我在使用 HTTPS 的网站上收到 503 服务不可用! (Apache/2.4.56 (Debian) 服务器位于 mydomain.com 端口 443)我遵循了教程,因为我以前从未使用过 certbot。这是教程(https://voiceoverit.de/blog/allgemein/mailcow-mit-reverse-proxy-auf-debian-ubuntu-installieren/938/)并且我已经完成了,直到我必须下载 Mailcow 并安装它(Mailcow herunterladen und installieren)。 Google Chrome 上显示连接安全且证书有效。我的目标是使用 docker/mailcow 容器配置 https 反向代理。
这是我的配置文件:
/etc/apache2/sites-enabled/mydomain.com
<VirtualHost *:80>
DocumentRoot /var/www/html/
ServerName mydomain.com
ServerAlias www.mydomain.com
ServerAlias autodiscover.*
ServerAlias autoconfig.*
RewriteEngine on
RewriteCond %{HTTP_HOST} ^autoconfig. [NC]
RewriteRule ^ - [S=1]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}# [L,NE,R=permanent]
RewriteRule ^ /autoconfig.php [PT]
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ProxyPreserveHost On
ProxyAddHeaders On
RequestHeader set X-Forwarded-Proto "http"
RewriteCond %{SERVER_NAME} =mydomain.com [OR]
RewriteCond %{SERVER_NAME} =autodiscover.* [OR]
RewriteCond %{SERVER_NAME} =autoconfig.*
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName mydomain.com
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ProxyPreserveHost On
ProxyAddHeaders On
RequestHeader set X-Forwarded-Proto "https"
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
我已经测试了资源,但它们没有超载。我还重新启动服务器。我的目标是使用 docker/mailcow 容器配置 https 反向代理。