2018-04-20 解决 apache2 reload时的警告

[Fri Apr 20 11:35:20.960020 2018] [mpm_event:notice] [pid 7760:tid 139783558137728] AH00493: SIGUSR1 received. Doing graceful restart

AH00557: apache2: apr_sockaddr_info_get() failed for ubuntu

AH00558: apache2: 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

[Fri Apr 20 11:35:21.194124 2018] [mpm_event:notice] [pid 7760:tid 139783558137728] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.5.24 Python/2.7 configured -- resuming normal operations

[Fri Apr 20 11:35:21.194160 2018] [core:notice] [pid 7760:tid 139783558137728] AH00094: Command line: '/usr/sbin/apache2'


修改后 3个文件后, 下面 就是完美运行的样子: 


[Fri Apr 20 11:40:40.646779 2018] [mpm_event:notice] [pid 7760:tid 139783558137728] AH00493: SIGUSR1 received.  Doing graceful restart

(原来这里出错的log位置 ,已经消失 了) 

[Fri Apr 20 11:40:41.037026 2018] [mpm_event:notice] [pid 7760:tid 139783558137728] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.5.24 Python/2.7 configured -- resuming normal operations

[Fri Apr 20 11:40:41.037151 2018] [core:notice] [pid 7760:tid 139783558137728] AH00094: Command line: '/usr/sbin/apache2' 


是 靠下面的方法解决的: 

参考网页: 

https://askubuntu.com/questions/256013/apache-error-could-not-reliably-determine-the-servers-fully-qualified-domain-n


This is just a friendly warning and not really a problem (as in that something does not work).

If you insert a

ServerName localhost 

in either httpd.conf or apache2.conf in /etc/apache2 and restart apache the notice will disappear.

If you have a name inside /etc/hostname you can also use that name instead of localhost.

And it uses 127.0.1.1 if it is inside your /etc/hosts:

127.0.0.1 localhost

127.0.1.1 myhostname

你可能感兴趣的:(2018-04-20 解决 apache2 reload时的警告)