LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (http://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   hostname not bringing the Apache test page in CentOS 6.2 (http://www.linuxquestions.org/questions/linux-distributions-5/hostname-not-bringing-the-apache-test-page-in-centos-6-2-a-4175427008/)

newpreludeking 09-13-2012 02:46 AM

hostname not bringing the Apache test page in CentOS 6.2
 
Good Morning

OS - CentOs 6.2

[root@centos etc]# dnsdomainname
testcentos.com
[root@centos etc]# uname -n
centos.testcentos.com
[root@centos etc]# cat hosts
127.0.0.1 centos.testcentos.com centos localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.8 centos.testcentos.com centos
[root@centos etc]# service httpd status
httpd (pid 2486) is running...
[root@centos etc]#
[root@centos etc]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:D8:BA:52:D5
inet addr:192.168.1.8 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::211:d8ff:feba:52d5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7691 errors:0 dropped:0 overruns:0 frame:0
TX packets:7899 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6281268 (5.9 MiB) TX bytes:1238084 (1.1 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:62 errors:0 dropped:0 overruns:0 frame:0
TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17765 (17.3 KiB) TX bytes:17765 (17.3 KiB)

[root@centos etc]#


If I put 192.168.1.8,127.0.0.1 or localhost in the browser, I am getting the Apache test page. If I put the dns name (testcentos.com) I am getting server not found.

Here is the directives I have put for Listen and ServerName in httpd.conf

Listen centos.testcentos.com:80
ServerName centos.testcentos.com

I am not sure what I am missing. Any help would be appreciated. thanks in advance

cheers

newpreludeking 09-13-2012 03:02 AM

Just found that

centos.testcentos.com

in the browser is bringing the Apache homepage. But If I put only testcentos.com, it is adding www. and it is saying server not found?


All times are GMT -5. The time now is 03:29 PM.