- root@31f62c83ce1e:/app# exec apache2 -D FOREGROUND
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
在Dockerfile中指定了
ENV APACHE_RUN_DIR /var/run/apache2
手动建立此文件夹即解决问题
- AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.24. Set the ‘ServerName’ directive globally to suppress this message
运行:
sed -i ‘s/#ServerName www.example.com:80/ServerName localhost:80/g’ /usr/local/apache2/conf/httpd.conf
即可解决