Moving site to a different IP

I seem to be the best, read worst, customer of this forum :slight_smile:

I want to change one account/site in InterWorx (NodeWorx) to a different IP address, another of mine which is shared.

Can I just go to DNZ Zone Management for the particular site and edit mail.mydomain.com and mydomain.com to a different IP address?

Likewise can I safely switch to and from “Shared IP Address” without the website going down?

Just want to be sure before I mess anything up.

Thanks

PS: NodeWorx/SiteWorx is much easier than Webmin, and even CPanel. It is just lacking a bit in features/options. Examples: File Manager, Better Error Log displaying, cgi scripts add-on (Forum, Guest Book, Counters etc.)

I want to change one account/site in InterWorx (NodeWorx) to a different IP address, another of mine which is shared.

Can I just go to DNZ Zone Management for the particular site and edit mail.mydomain.com and mydomain.com to a different IP address?

You have to change the IP address which the SiteWorx account is on as well. And
unfortunatley to change an IP on a SiteWorx account means you need to delete it and recreate it (for now).

Likewise can I safely switch to and from “Shared IP Address” without the website going down?

You can change from shared -> static (and vice versa if applicable) without problems.

PS: NodeWorx/SiteWorx is much easier than Webmin, and even CPanel. It is just lacking a bit in features/options. Examples: File Manager, Better Error Log displaying, cgi scripts add-on (Forum, Guest Book, Counters etc.)

Thanks, and we are working on the features daily/nightly/all-the-time :).

Chris

Chris if I delete an account, because I want to change the the sites IP address, will NodeWorx then delete my folders?

And if it does, a future upgrade might want a checkbox to “Keep Files & Folders”.

It will delete files/folders, and changing the IP of a SiteWorx account is an obvious addition that needs to be made but again, at this point will take a lower precedence to the other core features we’re working on at the moment RWF.

Thanks,

Chris

Ok, I see Chris, but then please tell me what is, and what will the following do:

Goto NodeWorx|DNZ Zone Management|Records

and edit the two “A” type records (mail.mydomain.com AND mydomain.com) to a different IP address?

I mean why is it editable if it does not do anything? Or does it do something, then what?

Goto NodeWorx|DNZ Zone Management|Records

and edit the two “A” type records (mail.mydomain.com AND mydomain.com) to a different IP address?

I mean why is it editable if it does not do anything? Or does it do something, then what?

Sorry I wasn’t clear. When you delete the SiteWorx account your DNS entries for that SiteWorx zone will be deleted as well. When you create the new SiteWorx account a new zone will be created for the new SiteWorx account (which happens to have the same domain name as the old one).

Does that make sense?

Chris

I did understand that Chris, but why is there an option to change the IP address, as I just explained if it does absoultely nothing? Or does it do something that I edit the IP address of a site?

The DNS interface allows you to edit any/all IPs for a given zone. You can point any domain to any other IP address and since the DNS interface assumes you know what you are doing it won’t complain if you point your www.<mydomain>.com to some random IP address even if this is not what you intended to do.

Chris

Let me see if I understand you correctly.

I can change/point one website to another IP address, but it just won’t reflect in the “IP Management” section, is that correct?

That’s correct. DNS is ‘standalone’. When you make a SiteWorx account we build up some basic DNS entries for you, but after that you manage the DNS mappings independently.

Chris

Originally posted by IWorx-Chris
[B]It will delete files/folders, and changing the IP of a SiteWorx account is an obvious addition that needs to be made but again, at this point will take a lower precedence to the other core features we’re working on at the moment RWF.

Thanks,

Chris [/B]

You can change the ip address in http configuration:

Domain example.com

edit /etc/httpd/conf.d/example.com.conf
and change the ip address in Line

<VirtualHost xx.xx.xx.xx:80>

to

<VirtualHost yy.yy.yy.yy:80>

Then restart Apache doing

killall -HUP httpd

it works for me.

hpinto,

thanks.

Do you know if that change will also be reflected in InterWorx, DNS Setting - Records for that particular site, after restart of Apache?

Originally posted by RWF
[B]hpinto,

thanks.

Do you know if that change will also be reflected in InterWorx, DNS Setting - Records for that particular site, after restart of Apache? [/B]

This change will be reflected in Interworx “IP Management”, but you will need to change DNS records using DNS Management section.

hpinto / RWF,

What hpinto suggests will work as we offload the mapping between SiteWorx accounts and IP to the httpd.conf for the given SiteWorx Account (in /etc/httpd/conf.d/…conf on RH9). So by changing the DNS and config file for httpd you can move accounts between IPs. Thx hpinto, for some reason in my head it was more complicated than that :).

Chris

Kewl, that solves it then…Until InterWorx can handle it though the interface.

Thanks

hpinto

ok I changed one site’s DNS records through InterWorx, and then I edited the /etc/httpd/conf.d/example.com.conf as you wrote.

However I did NOT do the command:

killall -HUP httpd

Instead I restarted the Apache webserver through InterWorx, but it does not seems to work, as when I look in “IP Management” the site has not moved to a different IP.

What share/free-ware program can I use to issue the killall command, this is something that should be integrated into InterWorx, issuing commands that is.

Yikes!

After doing the above steps, my site went in black, that is all visitors is greeted with is the Apache Test Page. Why did that happen?

Anyways I edited the conf file back, and now my site is up again.

Moving site to a different IP

RWF,

If the section IP Management don’t show the change you must review the process.

you need to make changes in the machine trought command shell (bash) as root changing the configuration file for your domain:

For domain “example.com” you need to change the file “example.com.conf”. For domain “test.com” you need to change “test.com.conf”.

Example:

If I have to change the ip for my domain “foo-bar.com” from ip: 192.168.0.60 to 192.168.0.30. then i will make the following change:

Edit file “/etc/httpd/conf.d/foo-bar.com.conf” (i use vi or pico)

Change the line:
<VirtualHost 192.168.0.60:80>

to
<VirtualHost 192.168.0.30:80>

then in command shell (as root) type:

killall -HUP httpd

or restart Apache trought Interworx.

This works with RedHat 9 and changing this line in the machine you will see the changes in Ip Management Section inmediately.

I did exactly as you explained. However I edited the conf file, immediately after I changed the DNS records!

And that seemed to have been the cause of the blackout (Apache testpage showing), apparently I had to wait to edit the conf file until after the TTL (Time To Live) for the two “A” records to recheck and digest the new IP addresses.

So what I did was this, which have worked on two sites I moved to a different IP address.

  1. Change DNS records in InterWorx for particular site, under DNS Managements. Noticing TTL values.

  2. Check site often through browser, around expected TTL recheck.

  3. As soon as the Apache test page comes up in browser, edit conf file and restart Apache!

Maybe not elegant, but that works :slight_smile:

One slight thing with the above procedure.

It does NOT seem to make available, an now unused IP address, in the drop-down “IP Address” box, when creating a new site.

I am currently browsing through my server to see if there is a config file which contains the “available” IP addresses.