AH00558:httpd:无法可靠地确定服务器的完全合格

时间:2019-07-16 17:25:07

标签: apache docker macros

我正在使用Mac book pro。我试图找出为什么我的本地主机无法正常工作。它会继续返回此消息;

我进行了apachei配置测试:

  

apachectl configtest

H00557: httpd: apr_sockaddr_info_get() failed for MacBook-Pro.local
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

怀疑发生此错误是因为我使用brew安装了多个版本的php。

我知道我需要以此编辑我的apache配置文件。

我运行以下命令来查找正在使用的apache文件:

  

apachectl -t -D DUMP_INCLUDES

Included configuration files:
  (*) /private/etc/apache2/httpd.conf
    (499) /private/etc/apache2/extra/httpd-mpm.conf
    (505) /private/etc/apache2/extra/httpd-autoindex.conf
    (545) /private/etc/apache2/other/php7.conf
AH00557: httpd: apr_sockaddr_info_get() failed for endys-MacBook-Pro.local
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message

我也使用

  

其中-a apachectl

此返回:

/usr/sbin/apachectl

我尝试过:

  

sudo vi /usr/local/apache2/conf/httpd.conf

然后添加:

 ServerName localhost

但这返回了此消息:

"/usr/local/apache2/conf/httpd.conf" "/usr/local/apache2/conf/httpd.conf" E212: Can't open file for writing Press ENTER or type command to continue

更重要;当我运行此DOCKER时;

  

docker run -it -p 80:80 -p 443:443 nginx

IT返回了;

   docker: Error response from daemon: driver failed programming external connectivity on endpoint boring_williams 

(8a5af902bb79be542a04718c6945dd8884ab8cca7e2d28ebf30c319f1aa0a0f5): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error (Failure EADDRINUSE).

因此PORT 80-本地主机存在定义问题

我现在不清楚我应该更改哪个配置文件,以及如何找到它。

0 个答案:

没有答案