I got my VPS today. Installed CentOS 5. And it says the only virtual serever I have is site1.com
So I installed virtualmin and gave site1.com as hostname. Now I tried to creat a new virtual server via virtualmin for site1.com but it won’t let me. This is because you cannot use the hostname as a virtual server. So how am I expected to upload files onto site1 and use it as a site? Or when I installed should the IP have been the host name?
Another problem I have is creating private nameservers. I have an IP for my VPS so do I just go to my domain registrate and register private server for ns1 and ns2 using that ip?
Whenever you have a server, it should use an “FQDN” as the hostname… an FQDN means that it is in the format “host.domain.tld”.
My recommendation would be to change your system’s hostname so that it’s something like “server1.site1.com”.
Then, you’ll be able to create a Virtual Server named site1.com.
As far as creating nameservers goes – not all registrars will allow you to register two nameservers with just one IP address. But you can try it, that might just work! There’s instructions on setting up nameservers here in the question titled “How do I setup nameservers for my server”:
Nope! You can make all those changes without reinstalling.
You can do the following:
Go into Webmin -> Networking -> Network Configuration, and change the “Hostname” field to be your desired hostname.
Then go into Webmin -> Networking -> Network Configuration -> Host Addresses, and make sure your hostname is listed correctly there next to your primary IP address.
Lastly, go into Webmin -> Servers -> Postfix -> General Options, and add your system’s new hostname to the end of the “What domains to receive mail for” option.
Okay in Network Configuration my hostname is site1.com
Mmm, well, you’d want to make sure that your hostname is in the “host.domain.tld” (FQDN) format, or else you could run into problems. So, rather than “site1.com”, you’d want to use “server1.site1.com” as your hostname.
As far as that AWStats error goes – chances are something went wrong during the previous attempts to create that domain, and some remnants of that are still laying around.
If you log into your server as root over SSH, and ‘cd’ into /etc/awstats, you’ll see a file that is named something like:
awstats.site1.com.conf
You may need to delete that file, and then try adding your Virtual Server again.