Monday, February 22, 2016

Starting httpd: httpd: apr_sockaddr_info_get() failed for test.dba.com

[root@test repo]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for test.dba.com
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]
[root@test repo]#
[root@test repo]#
[root@test repo]#
[root@test repo]# cd /etc/httpd/
conf/    conf.d/  logs/    modules/ run/
[root@test repo]# cd /etc/httpd/conf.d/
mod_dnssd.conf  php.conf        README          welcome.conf
[root@test repo]# cd /etc/httpd/conf/
httpd.conf  magic
[root@test repo]# cd /etc/httpd/conf/
[root@test conf]# ls
httpd.conf  magic
[root@test conf]#
[root@test conf]# cp httpd.conf httpd.conf_org
[root@test conf]#
[root@test conf]#
[root@test conf]# vi httpd.conf
[root@test conf]#

Changes
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80
ServerName 192.168.0.61(your system ip)



#


[root@test conf]#
[root@test conf]# service httpd stop
Stopping httpd:                                            [  OK  ]
[root@test conf]#
[root@test conf]# service httpd start
Starting httpd:                                            [  OK  ]
[root@test conf]#
[root@test conf]#

[root@test conf]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
[root@test conf]#
[root@test conf]#
[root@test conf]#


Then check from browser 

192.168.0.61

Enjoy!!!!

No comments:

Post a Comment