首页 > 解决方案 > 来自 Apache http /.well-known/acme-challenge 的无效响应

问题描述

我有 Apache httpd 服务器版本 2.4.33 在 ubuntu 仿生下工作。我已经使用以下配置进行了编译

./configure --prefix=/opt/apache2 --enable-pie --enable-mods-shared=all --enable-so --disable-include --enable-lua --enable-deflate --enable-headers --enable-expires --enable-http2 --with-nghttp2=/opt/nghttp2 --enable-ssl=shared --with-ssl=/opt/openssl --with-openssl=/opt/openssl --with-crypto --enable-module=ssl --enable-mpms-shared=all --with-mpm=event --enable-rewrite --with-z=${HOME}/apache24/httpd-${HTTPD_VERSION}/srclib/zlib --enable-md --enable-fcgid --with-included-apr CFLAGS="-O0 -g3 -fsanitize=address"

我想安装让我们加密 ACME,提供的错误是:

example.com:Verify error:Invalid response from http://example.com/.well-known/acme-challenge/gteJptcJbMgc7jmGx1EO6-Uf0Ox2bELI44nT6oYcJOI: 

我几乎什么都试过了。使用 chown -R user:user htdocs/ 更改所有权,将权限更改为 chmod 755 -R htdocs 甚至更改为 777,但无法打开 acme-challenge。我已经多次修改 httpd.conf 并没有任何不同的响应

标签: linuxapachehttpd.conflets-encrypt

解决方案


最终解决方案,因为我已经从 apache 编译了我自己的网络服务器

  1. 配置如下 ./configure --prefix=/opt/apache2 --enable-mods-shared=all --enable-so --enable-md --enable-deflate --enable-headers --enable-http2 --with-nghttp2=/opt/nghttp2 --enable-ssl=shared --with-ssl=/opt/openssl --with-openssl=/opt/openssl --with-crypto --enable-module=ssl --enable-mpms-shared=all --with-mpm=event --enable-rewrite --with-z=/home/vrt/apache24/httpd-2.4.33/srclib/zlib --enable-fcgid --with-included-apr CFLAGS="-O0 -g3"

  2. 编译和安装$make && sudo make install

  3. 当它最终安装时,只需修改 httpd.conf 以监听端口号 5002

  4. 运行您的 certbot 或 acme.sh 和 Viola!我不应该在初始证书生成之前启用 md

我希望它对未来的人有所帮助


推荐阅读