Skip to contentSkip to conversation

apache2: fix error messages when restart apache service

PATCH New Hongxu Jia 1 participant 2 messages Sep 25, 2013

lore
Share & tools
lore

Hongxu Jia

author
#0 lore raw

cover apache2: fix error messages when restart apache service

The following changes since commit 7e0bdfc5ecf7c551416e2a193c9220347d8fe03f:

lowpan-tools: add git version (2013-09-24 09:04:55 -0400)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib hongxu/fix-apache2
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-apache2

Hongxu Jia (1):
apache2: fix error messages when restart apache service

 meta-webserver/recipes-httpd/apache2/apache2_2.4.6.bb | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH 1/1 apache2: fix error messages when restart apache service

There are error messages when restart apache service:

Observed Behavior
======================

root@qemu0:/etc/php# apachectl restart
AH00557: httpd: apr_sockaddr_info_get() failed for qemu0
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
root@qemu0:/etc/php# /etc/init.d/apache2 restart
AH00557: httpd: apr_sockaddr_info_get() failed for qemu0
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
root@qemu0:/etc/php# /etc/init.d/apache2 stop
AH00557: httpd: apr_sockaddr_info_get() failed for qemu0
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

Add 'ServerName localhost:80' to httpd.conf could fix this issue.

---
 meta-webserver/recipes-httpd/apache2/apache2_2.4.6.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-webserver/recipes-httpd/apache2/apache2_2.4.6.bb +2 -0
index 6f5dd23..c081751 100644
@@ -73,6 +73,8 @@ do_install_append() {
     printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
     # match with that is in init script
     printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
+    # Set 'ServerName' to fix error messages when restart apache service
+    sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
 
     if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 
         install -d ${D}${sysconfdir}/tmpfiles.d/
Signature · 1 line
1.8.1.2