Docker PHP-APACHE容器全局设置ServerName指令 [英] Docker PHP-APACHE container set the ServerName directive globally
问题描述
当我尝试在docker上运行php:apache容器时收到此警告,请知道如何解决此问题.
I get this warning when i try to run my php:apache container on docker please any idea how to solve this.
AH00558:apache2:无法可靠地确定服务器的完全状态
限定域名,使用172.17.0.2.设置"ServerName"全局伪指令以禁止显示此消息AH00558:apache2:可以使用以下方法无法可靠地确定服务器的标准域名:172.17.0.2.全局设置'ServerName'指令以禁止显示此消息[2018年2月19日星期一14:18:21.041074] [mpm_prefork:notice] [pid 1]AH00163:已配置Apache/2.4.10(Debian)PHP/7.0.27-恢复正常运作[2018年2月19日星期一14:18:21.041534] [core:notice] [pid1] AH00094:命令行:"apache2 -D FOREGROUND"
AH00558: apache2: 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: apache2: 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 [Mon Feb 19 14:18:21.041074 2018] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/7.0.27 configured -- resuming normal operations [Mon Feb 19 14:18:21.041534 2018] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
DOCKERFILE:
DOCKERFILE:
FROM php:7.0-apache
COPY . /var/www/html/
EXPOSE 80
推荐答案
Voila感谢aserre的帮助:
Voila thanks to aserre for the help:
DOCKERFILE:
DOCKERFILE:
FROM php:7.0-apache
COPY . /var/www/html/
EXPOSE 80
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
这篇关于Docker PHP-APACHE容器全局设置ServerName指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!