Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP bind and virtual hosts

Status
Not open for further replies.

benharper

Technical User
Jun 28, 2001
3
US
Hello everyone. First off, this is my first time here and I have to say, this is one of the friendliest most helpfull forums Ive read.

On to the question. We are leasing a dedicated server with 7 ip's from a company. We do not control the nameservers. My question is, when the company controling the nameservers adds a zone to the servers pointing to the ips on our leased machine, are the ip's then bound to the namesevers or is there another step I need to take in order to get the domains working.

Ive added ip based virtual host info into the httpd.conf file but I keep getting a server not found error.

Can anyone shed some light on this for me?

Thank you, any help is appreciated.
David
 
Ok, if anyone else is having the same problem, I figured this out.

It finally clicked in my head that I needed to bind the ip with the network interface.

In order to bind the ip's on my server (RH Linux 6.2 running apache), you have to alias mutiple ip's for the network interface. (eth0 on my server) The file for this is in /etc/sysconfig/network-scripts it is called ifcfg-eth0 and on my server it looks like this:
DEVICE=eth0
BOOTPROTO=static
IPADDR=ip address of server
NETMASK=netmask
GATEWAY=gateway
HOSTNAME=hostname
NETWORK=network
DOMAIN=domain
(Of course the IPADDR, NETMASK, etc are the actual ip's)

Simply make a new file (in the same directory) called ifcfg-eth0:0 and place the above info into it. Change the device name to eth0:0 and the ipaddr to whatever ip you want to bind to the interface. Then bring up the interface by running the command "ifconfig eth0:0 up" or "/etc/sysconfig/network-scripts/ifup eth0:0" whatever works.

Hope this help someone out.
Peace

 
You can also make those scripts without copying files by issuesing 2 commands:
1) ifconfig eth0:1 192.168.1.3
2) route add -host 192.168.1.3 eth0:1

Hope this helps!!!


Rninja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top