[SOLVED]I altered my hostname, but every new vhost created, comes with the old hostname!

19 posts / 0 new
Last post
#1 Mon, 10/16/2017 - 09:43
herculesnetwork

[SOLVED]I altered my hostname, but every new vhost created, comes with the old hostname!

I changed my hostname to /etc/hosts and /etc/hostname

I've rebooted the machine (vps) and checked in virtualmin=>networking=>Hostname and DNS Client and my new FQDN is already configured, I'm basing myself on a new domain that I bought for my new website to be the new FQDN name of my VPS : vps5.newdomain.com ... I have switched my PTR reverse with the new FQDN on my ISP (ovh and everything ok)

but every time I create a new virtual server, all settings in virtualmin=>server configuration=>DNS Records ( DNS Table ) of this new domain added, comes with all the old settings! How do I update this within virtualmin and nginx and postfix(I have updated in /etc/postfix/main.cf)? virtualmin always did everything to me with the old domain vps5.olddomain.com, where I have to warn vitualmin that now my hostname is changed, is it a new hostname?

I've already done up a grep scan by my old hostname in the nginx, opendkin, bind, and everything is updated with my new hostname. grep -R 'vps1.oldhostname.com' grep -R 'oldhostname' and ANYTHING WRONG, no register with oldhostname.

(I believe this is disrupting even in the generation of my dkim sign. because it is using as base a domain that no longer exists).

ubuntu 16.04/64bits /nginx /mysql /webmin 1.860(last) /postfix /Bind9.10

Thanks all/Regards.

virtualmin needs to improve

[ANSWER: Making a grep -R 'vps1.oldhostname.com' in /etc/webmin virtual-server/last-config: bind_master = vps.oldhostname.com virtual-server/config: bind_master = vps.oldhosname.com

nano /etc/webmin/virtual-server/last-config nano /etc/webmin/virtual-server/config bind_master = vps.oldhostname.com (update here informing your new hostname)

I came back here to help, and I appreciate you joe and alphadelphi for trying to help, and to say that we need more people like you here in the community to help, in 95% of the cases I get no response, no comments, and users important of the community mocking of my English(I can not help because I do not understand your English!)! We are in T.I. and English is not my mother tongue, I have no obligation to master a language that my country does not speak.   Thank you guys and I hope this helps other people ... and I think virtualmin could fix this CUSTOM. should update these files automatically. ]

virtualmin needs to improve

Tue, 10/17/2017 - 04:55
adelphia
adelphia's picture

I think (but not 100% sure) you need to go to Webmin->Networking->Network Configuration->Hostname and DNS Client. Change your settings there to reflect the new hostname and make sure the option Update hostname in host addresses if changed? is selected.

Remember that it is also possible that the domain name is being picked up from your router if you haven't manually configured it.

Please let me know if this works.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Tue, 10/17/2017 - 19:57 (Reply to #2)
herculesnetwork

Hi, Thanks ... Webmin-> Networking-> Network Configuration-> Hostname and DNS Client is the path I mentioned, and see, this way of doing things through webmin, is a shortcut, a graphical way of doing things , In case, if I already went in the file to do, and when I go that way that I said and you repeated, everything is already properly configured. It is not in this part that virtualmin or bind will know that my hostname now has another name. in host address (etc/hosts) everything is ok, because like I said, I already configured everything manually.   I appreciate your participation, if you can have another idea thank you.

Wed, 10/18/2017 - 05:09 (Reply to #3)
adelphia
adelphia's picture

I presume you have done a Virtualmin configuration re-check, just to make sure you haven't upset anything by editing the files manually?

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Thu, 10/19/2017 - 06:11 (Reply to #4)
herculesnetwork

I still not had done the verification, thanks for talking about it..

it's all right ( .. your system is ready for use by Virtualmin. )

but my new virtual hosts are still created with the old hostname in the dns tables :-(

Thu, 10/19/2017 - 15:36 (Reply to #5)
adelphia
adelphia's picture

How long ago do you switch over? You know it can take 48 hours or more to fully propagate. If you're on Windows, try issuing the command ipconfig flushdns and then restart system after a successful flush. You may also need to flush the cache in your browsers.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Thu, 10/19/2017 - 21:36 (Reply to #6)
herculesnetwork

These changes are over 2 months. As you can see, I'm on ubuntu 16 on vps, and on PC. I do not think it could be something in browsers, a form of virtual, bind, nginx, create my dns table, it is based on our remote machine data, our remote machine files (vps), could not be based on data from my Chuck! in my browser's cache! Anyway I tried.

Fri, 10/20/2017 - 03:33
adelphia
adelphia's picture

Unfortunately I don't know what else to suggest. Given that Webmin/Virtualmin by default installs and uses Apache rather than nginx (in fact it uninstalls nginx) and I don't use nginx myself, I'm at a loss as to where to go next.

One last thing you might want to try is to backup each of your domains, delete them from Virtualmin, make sure your DNS entries are all clear and then re-import them. I know this is a drastic measure but it's the only thing I can think of unless you want to post your DNS config and any other relevant configuration files like nginx etc. or someone else can chip in and offer a solution.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Sat, 10/21/2017 - 00:01 (Reply to #8)
herculesnetwork

I'm going to opt for manually editing my tables on my server (every new vritual server created!), Because this measurement is very drastic, online projects can not go offline, since virutalmin / webmin do not know that I changed my hostname, even that in virtualmin => System Information, my new hostname appears, but in every creations it's virtually treating my old hostname, if that's a problem because I use nginx, it's a very big deficiency of virtualmin does not adapt to the lightest and powerful web server for all .. since I installed following best tutorials, using nginx module for virtualmin ... the largest and most robust projects in the world use nginx. is much faster, lightweight, flexible etc ... you can maintain a larger 4x project, and a smaller 4x server, I do not know a person who has opted for nginx and has a return to apache. I've never heard of anything like it. I've spent a lot of hours trying to solve this, re-editing several files and editing back, I've restarted my vps several times ... I'll expect a more accurate answer here on how to solve this. Thank you for your time and attention :-)

Sat, 10/21/2017 - 04:29
adelphia
adelphia's picture

As you haven't posted any config files etc. it's very difficult for anyone to help. You really need to show your log files, nginx & DNS config files at least so people can at least look to see what may be causing you this issue. Obviously, remove any information you class as sensitive before hand.

If you post this then more people may be inclined to help.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Sun, 10/22/2017 - 00:21 (Reply to #10)
herculesnetwork

I have no problem in showing my settings, any text editor like gedit, geany, etc., have features like [find and replace], onte with a simple command, we change IPs to 222.222.222.22 and domains for aaaaaaaaa.com and others points of the configuration very automatically, fast and that ensures that nothing is left to be edited .. I always do this in forums, but in this case, I have no errors in my logs, this is not a problem of errors in the system, is a problem of virtualmin not knowing that I have a new hostname in my OS ... the machine name has changed ... I mean ... in virtualmin's home, in hotname the name is updated .. but it talks it start use this to create new virtual servers ... this is just a matter of a person using nginx, and domain the virtualmin and tell me where I have to change manual, since the virtualmin is "anti nginx" ... I have using [grep] to look for settings with my old hostname, and I reconfigured nginx.conf and opendkim.conf a long time ago, but nothing I do makes the virtualmin look at my machine, like a machine with a new name.

Sun, 10/22/2017 - 03:36
adelphia
adelphia's picture

Look in /etc/hosts. Do you see anything relating to the old name there? Also, what IP is being returned when you ping the old and new hostnames?

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Sun, 10/22/2017 - 05:59
herculesnetwork

Hey friend :-)    Yes ... as it is in my question, I actually changed my server name in hosts and hostname files (I updated now by placing strong in the question:) ... so that in ping + newhostname ... it is certainly dripping my IPv4 of vps ... and how do I type hostname -f is certainly showing up my hostname :-)    But the problem is to update this in some virtualmin file that it does not do automatically ... as I said before ... in virtualmin => system information, is showing my new hostname and my vps IP correctly. that means I changed it correctly, but I just checked the files directly (even though I know it's from there that virtualmin pulls this information to show in system information) and everything is perfectly returned in [ping vps5.newname.com] is showing my vps ip and [hostname] -f is showing my new hostname... now. I can only think that the question is in the virtualmin files.

Tue, 10/24/2017 - 05:42
adelphia
adelphia's picture

Sorry, but I really don't know what else to suggest. Unless you share the domain (I'm presuming it's public) so I can see what response I get when going to the site, there's not much else I can do I'm afraid.

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Tue, 10/24/2017 - 18:54 (Reply to #14)
herculesnetwork

Everything anyone can do here with the domain name dot com. like domains analysis such as intodns.com and the like, (ptr reverse, MX records etc..)I know how to do, all the answers that you can have with the name of domain.com I have the answer for myself, and I assure you, my vps is well configured, everything you can see through my site, it's about the configuration of vps, I already checked and everything is correct with the name hostname, you will not notice any strange behavior in the responses of the website !! my vps ipv4. my new hostname is propagating to several months around the world, I say again to you, the problem is in the virtualmin configurations. I know neither of us knows what to do with my virtual, and I appreciate your answers trying to help me :-)

Tue, 10/24/2017 - 20:37
Joe
Joe's picture

Unless you've manually configured Virtualmin to do otherwise, it uses the hostname of the system for the default DNS server name in NS records. There is a configuration option to change it, but the default is the system hostname.

So...I'm not sure how this could happen unless you've explicitly told Virtualmin to use a different name.

Are you absolutely sure your system reports its hostname correctly?

When you run: hostname -f does it return the right name?

--

Check out the forum guidelines!

Wed, 10/25/2017 - 03:22 (Reply to #16)
herculesnetwork

Hello Joe, thx for reply... as I told our friend adelphia, all the answer I have to the server is correct, hostname -f, reverse ptr, intodns etc ...everything with my new hotname updated, only virtualmin is not following my settings when creating tables in new virtualhosts, I repeat this several times in the comments above. because it's really amazing everything is correct and the virtualmin does not change the name when creating a virtual server.

Fri, 10/27/2017 - 04:21
herculesnetwork

Making a grep -R 'vps1.oldhostname.com' in /etc/webmin virtual-server/last-config: bind_master = vps.oldhostname.com virtual-server/config: bind_master = vps.oldhosname.com

nano /etc/webmin/virtual-server/last-config nano /etc/webmin/virtual-server/config bind_master = vps.oldhostname.com (update here informing your new hostname)

I came back here to help, and I appreciate you joe and adelphia for trying to help, and to say that we need more people like you here in the community to help, in 95% of the cases I get no response, no comments, and users important of the community mocking of my English(I can not help because I do not understand your English!)! We are in T.I. and English is not my mother tongue, I have no obligation to master a language that my country does not speak.   Thank you guys and I hope this helps other people ... and I think virtualmin could fix this CUSTOM. should update these files automatically.

Fri, 10/27/2017 - 06:56
adelphia
adelphia's picture

Glad you finally got it sorted!

Chris: Adelphia Interactive
Desktop: Windows 10 Pro x64
Server: Ubuntu 16.0.4.2LTS
Webmin/Virtualmin: Latest (daily updates)

Topic locked