Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

/etc/hosts:

10.0.11.162 mpcore.bts.md mpcore
127.0.0.1   localhost.localdomain   localhost
::1 mpcore  localhost6.localdomain6 localhost6

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/nsswitch.conf

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:          files dns mdns4_minimal [NOTFOUND=return] mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

/etc/network/interfaces

auto eth0
iface eth0 inet static
address 10.0.11.162
netmask 255.255.255.0
network 10.0.11.0
broadcast 10.0.11.255
gateway 10.0.11.1

So, when I use IP http://10.0.11.162 I get the index.html

But when I use http://mpcore.bts.md I get "Server Not found" error

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Your server configuration is fine. The problem is that mpcore.bts.md simply does not exist, neither in DNS nor the hosts file.

Remember that your server's /etc/hosts only applies to programs running on that server. If you are trying to connect from a different computer, it cannot see the server's hosts file, only its own.

share|improve this answer
    
ok i was able to see the Virtual host from console (localhost) but not from outside : i have ESXi installed on 10.0.11.11 DNS = 10.0.11.1, and 10.0.1.1 Installed an Ubuntu 10.4 64 bit VM on this ESXi with IP = 10.0.11.162 , dns = mpcore.example.com Installed apache2 on 10.0.11.162 Configured virtual host "qa.mpcore.com" This is Visible via a browser on the ubuntu console , but not from another computer outside the ESXi Environment Any idea how to resolve this ? Thanks, –  kamal Oct 22 '11 at 2:21
    
@kamal: Add the mpcore subdomain to the DNS servers of bts.md. The primary server is ns.ultra.md, start with that. –  grawity Oct 22 '11 at 13:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.