Apache2 讓我們為 .well-known/acme-challenge 加密 404

Apache2 讓我們為 .well-known/acme-challenge 加密 404

我正在嘗試在我的 Apache2 AWS ECS 上發出 Lts 加密 ssl。

我確認網域的 www 和非 www 版本都正確指向伺服器,但是我收到一個錯誤,我不確定如何修復。

Type:   unauthorized
Detail: Invalid response from http://example.com/.well-known/acme-challenge/VR1csQL-Tp-tPMqMtmG1EcLWncgxMdov4MGZgq2RqQY
[3.210.25.136]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>404 Not
Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"

我的虛擬主機檔案如下所示

<VirtualHost my-ip-here:80>

    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/example

    <Directory /var/www/example>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

    Alias /.well-known/acme-challenge/ /var/www/example/.well-known/acme-challenge/
    <Directory /var/www/example/.well-known/acme-challenge/>
      AllowOverride None
      Require all granted
      Satisfy Any
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
    CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined

  </VirtualHost> 

相關內容