【问题标题】:Apache / httpd default configuation from docker image来自 docker 镜像的 Apache / httpd 默认配置
【发布时间】:2019-04-30 23:11:19
【问题描述】:

我在运行 Apache 时有这个输出,使用:

FROM httpd:2.4

标准输出是:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[Tue Apr 30 23:08:14.602222 2019] [mpm_event:notice] [pid 1:tid 140596800061504] AH00489: Apache/2.4.39 (Unix) configured -- resuming normal operations
[Tue Apr 30 23:08:14.602371 2019] [core:notice] [pid 1:tid 140596800061504] AH00094: Command line: 'httpd -D FOREGROUND'

如何在本地访问 apache 服务器然后使用浏览器?

这是我看到的默认配置:

 /usr/local/apache2/conf/httpd.conf

https://gist.github.com/ORESoftware/27ec1911066ab4de85305dfa14bb7165

【问题讨论】:

    标签: apache httpd.conf


    【解决方案1】:

    看起来容器已经启动并且 Apache 正在运行,所以您应该能够将浏览器指向 localhost 或 127.0.0.1,这应该会显示默认页面(“It Worked!”或类似内容)。

    由于您正在运行 docker 容器,还请确保您在 Dockerfile 中公开了端口 80,并且没有任何操作系统防火墙设置妨碍您。

    编辑:如果该警告消息困扰您(它困扰我),您可以添加类似 ServerName localhost 的指令到 httpd.conf 来修复它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-18
      • 1970-01-01
      • 2019-07-07
      • 1970-01-01
      相关资源
      最近更新 更多