I am started install LAMP on FreeBSD 9.1 -64 bit today . Found Error . After a lot of research and logs found a way to fix . Hope this helps
Error : 1
When i start Apache 22
httpd: apr_sockaddr_info_get() failed for FreeBSD
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
Console Output :
root@FreeBSD:/usr/ports/www/apache22 # /usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
httpd: apr_sockaddr_info_get() failed for FreeBSD
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
Starting apache22.
httpd: apr_sockaddr_info_get() failed for FreeBSD
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
root@FreeBSD:/usr/ports/www/apache22 #
root@FreeBSD:/usr/ports/www/apache22 #
Error :1 Fix
root@FreeBSD:/usr/ports/www/apache22 #
root@FreeBSD:/root # ee /usr/local/etc/apache22/httpd.conf
#
#Listen 12.34.56.78:80
#Added By kartook ##########
ServerName 127.0.0.1
Listen 80
Error :2
When i start now the error shows different !!!!!!
Errors:
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of “FreeBSD”
Configuration Failed
Console Output Error :
root@FreeBSD:/root #cat /var/log/httpd-error.log
root@FreeBSD:/root # service apache22 start
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
root@FreeBSD:/root # cat /var/log/httpd-error.log
[Tue May 07 18:07:36 2013] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of “FreeBSD”
Configuration Failed
[Tue May 07 18:10:18 2013] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of “FreeBSD”
Configuration Failed
[Wed May 08 13:08:33 2013] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of “FreeBSD”
Configuration Failed
[Wed May 08 13:12:59 2013] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of “FreeBSD”
Configuration Failed
[Wed May 08 13:15:23 2013] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of “FreeBSD”
Configuration Failed
root@FreeBSD:/root # apachectl configtest
Syntax OK
root@FreeBSD:/root #
root@FreeBSD:/root #
Error :2 Fix :
The fastest way to get rid of the error is to disable mod_unique; edit the apache configuration file and comment LoadModule unique_id_module libexec/apache22/mod_unique_id.so
root@FreeBSD:/root #
root@FreeBSD:/root #
root@FreeBSD:/root # ee /usr/local/etc/apache22/httpd.conf
LoadModule expires_module libexec/apache22/mod_expires.so
LoadModule headers_module libexec/apache22/mod_headers.so
LoadModule usertrack_module libexec/apache22/mod_usertrack.so
############### edited by Kartook ########
#LoadModule unique_id_module libexec/apache22/mod_unique_id.so
LoadModule setenvif_module libexec/apache22/mod_setenvif.so
LoadModule version_module libexec/apache22/mod_version.so
LoadModule ssl_module libexec/apache22/mod_ssl.so
LoadModule mime_module libexec/apache22/mod_mime.so
Now starting the apache 22 🙂 and testing the status
Console Output :
root@FreeBSD:/root #
root@FreeBSD:/root # /usr/local/etc/rc.d/apache22 status
apache22 is not running.
root@FreeBSD:/root #
root@FreeBSD:/root #
root@FreeBSD:/root #
root@FreeBSD:/root # /usr/local/etc/rc.d/apache22 configtest
Performing sanity check on apache22 configuration:
Syntax OK
root@FreeBSD:/root # /usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
root@FreeBSD:/root #
root@FreeBSD:/root #
root@FreeBSD:/root #