hostname.bge0 failing after creating bge0:1 and rebooting

Hello,

I've got a puzzler here but it might be quick solution for some of you.

I'm trying to add a second IP address to a network adapter on a Solaris 10 box. I've created a hostname.bge0:1 file and put in the new name, e.g. new.mycom.com. I've added the new IP and the name to hosts. I've done:
Ifconfig bge0:1 plumb
Ifconfig bge0:1 xxx.xx.xx.xxx
Ifconfig bge0:1 up

There are really two problems.

  1. My new.mycom.com is resolving to old.mycom.com. I probably need to do something like set Listen xxx.xx.xx.xxx:80 in the httpd.conf for the old IP so the new IP can go to the new.mycom.com?
  2. After I get things set up and do a normal reboot, I cannot get to old.mycom.com. The page will not load in the browser. I can SSH to server. The only thingy that doesn't work is the WWW, I cannot get the index.html or any other page. Then when I remove the new hostname.bge0:1 and reboot, everything is fine and functioning as normal. Do I need to ifconfig hostname.bge0 up maybe? I've taken a look at ifconfig -a and it looks fine.

Any ideas? Please educate me.

Thank you,
Friedrich

1) it sounds like DNS or /etc/hosts is wrong

2) yes - httpd.conf may need to be updated to litsten on the new interface.

I *believe* /etc/hosts is correct. It is just the old IP and name and the new IP and name. Do they need to be in order by IP number or anything like that?

I've even updated netmasks and ipnodes with the new information and that doesn't stop the problem.

What the new IP and DNS entry is for is a piece of software that will be its own web server. I know I need to edit the httpd.conf of the old IP/name to listen to just theoldip:80, but that does not help. The old IP/name are an apache2 virtual host.

Thanks for your help, Frank.

If anybody can offer any insights I would be very appreciative. If you need to know more details about the software, just ask.

Thank you.

Names resolves to IP addresses and reciprocally. What do you mean name resolve to name ?
After reading a couple of times your question, I cannot understand what you are trying to explain. Can you clarify what the issue is ?

When I get things set up (the way I believe they are supposed to be) I open a web browser and navigate to new.mycom.com but it goes to old.mycom.com.

The program I am installing contains its own web server, so I should be going to the index.html, for example, set up for this different web server. So the old name is resolving when I enter either new.mycom.com or the new IP.

Thanks for your insights.

Friedrich

Are the browser and the web server running on the same machine ? What name resolution service are set ? Do you mean the web server is redirecting to old.something ? Still clear as mud ...

First, I've never seen anyone run 2 web servers off the same NIC. You may want to reconsider that.

Too many things going on at the same time: virtual IPs, virtual hosts, and not enough information to troubleshoot (actual contents of files).

Before I go further:
what do you mean by apache2 running on a virtual host? Do you mean a zone?
Has the application's web server (.i.e., newcom.com) been configured?
Is newcom.com running on a virtual host as well?

Okay. I've got a Solaris box with one nice. Right now I've got IP address 172.16.17.235 configured and functioning normally. It has a httpd.coInclude, by way of Include, includes a separate custom xxxhttpd.conf where all configuration details are on a virtual host?

What I am trying to do is install a piece of software that requires its own IP. So, I am trying to add a second IP address to that existing network adapter. The software, which I want to access at the new IP (172.16.17.227)/DNS entry (new.mycom.com), will be its own web server. New.mycom.com is not running on a virtual host.

I am working from instructions. I will link to them if that will help.

You keep saying the same things, just in a slightly different way :slight_smile:

I think everyone understands what you want to do, but without knowing what you are exactly doing in configuring this setup, I don't think anyone would be able to give you a concrete answer.

Out of curiosity, did you configure both old.com and new.com to run on the same port?

The whole reason I wanted two IP addresses on this network adapter is so both old.com and new.com could use port 80. They could each have there own port 80.

I can share with you exactly what I am doing. It is some software I used as a student and wanted just to get it working as a real life example instead of just theoretical.

Thanks again.

---------- Post updated at 07:02 PM ---------- Previous update was at 06:59 PM ----------

Proxy By Hostname Configuration [OCLC]

And pay attention to the Solaris link in step 6.

Sorry for the extra post but it said I couldn't post a link yet.

Please share any remarks if you can.
Thank you.

But you only have one port 80. You can have as many IPs as you want, but that doesn't mean a second port 80 is going to open up because of the new IP.

So this page is wrong? I thought it seemed off. --> Adding a Second IP Address to a Network Adapter on Solaris [OCLC]

Check httpd.conf, did you set the <virtualhost> portion?

Refer VirtualHost Examples - Apache HTTP Server for more examples.