• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Getting Close - DNS and Domains

B

bjsteiger

Guest
First off - this forum has been incredibly helpful -- thank you!

I have done the following:

1) Registered my name servers:
ns1.cafeinsomnia.net
ns2.cafeinsomnia.net

2) Added the domain (www.cafeinsomnia.net) to my client

3) My DNS entry looks like this:

www.cafeinsomnia.net. NS ns1.cafeinsomnia.net.
www.cafeinsomnia.net. NS ns2.cafeinsomnia.net.
cafeinsomnia.net. A 82.165.177.79
mail.cafeinsomnia.net. A 82.165.177.79
ns.cafeinsomnia.net. A 82.165.177.79
webmail.cafeinsomnia.net. A 82.165.177.79
ftp.cafeinsomnia.net. CNAME cafeinsomnia.net.
www.cafeinsomnia.net. CNAME cafeinsomnia.net
cafeinsomnia.net. MX (10) mail.cafeinsomnia.net.
82.165.177.79 / 24 PTR cafeinsomnia.net.

4) I have pinged the name servers and the domain and they are all pointing to the proper IP address but I cannot get the Web site to come up.

Overall I want to host multiple domains going to multiple sites....what should I be doing, I'm not sure what I am doing wrong.

bjs
 
I am getting a 'connection refused' when trying to browse to your IP or the domain name.

How did you configure your firewall? And are you using the Plesk firewall, APF, regular IPTABLES? Make sure port 80 is not blocked.

I can bring up your Plesk login page, which means that if nothing else, the domain is resolving to the IP, and port 8443 is not being blocked.

When you setup your domain, did you setup Physical Hosting and make sure the domain is turned 'On'?

In your above post, you have a single A record for ns.cafeinsomnia.net. You should have

ns1.cafeinsomnia.net. A 82.165.177.79
ns2.cafeinsomnia.net. A 82.165.177.79

and not

ns.cafeinsomnia.net. A 82.165.177.79

since you did not register 'ns' at the domain registrar.

And these lines are wrong:
www.cafeinsomnia.net. NS ns1.cafeinsomnia.net.
www.cafeinsomnia.net. NS ns2.cafeinsomnia.net.
www.cafeinsomnia.net. CNAME cafeinsomnia.net

Weren't you the one I posted a lengthy info-post the other day, with examples of DNS and what it should look like?

Here is more what it should look like (I did this quickly and believe it matches what I posted the other day):
Code:
cafeinsomnia.net.		NS		ns1.cafeinsomnia.net.
cafeinsomnia.net.		NS		ns2.cafeinsomnia.net.
ns1. cafeinsomnia. net.		A 		82.165.177.79
ns2. cafeinsomnia. net.		A 		82.165.177.79
cafeinsomnia.net.		A		82.165.177.79
mail.cafeinsomnia.net.		A		82.165.177.79
webmail.cafeinsomnia.net.	A		82.165.177.79
*.cafeinsomnia.net.		CNAME		cafeinsomnia.net.
ftp.cafeinsomnia.net.		CNAME		cafeinsomnia.net.
[url]www.cafeinsomnia.net.		CNAME		cafeinsomnia.net.[/url]
cafeinsomnia.net.		MX (10)		mail.cafeinsomnia.net.
82.165.177.79 / 24		PTR		cafeinsomnia.net.

Notice when there are periods at the end of the NS, CNAME, MX, and PTR records
(damn tabs)
 
WOW -- Thank you soooo very much!!!

I think you did post to me before and I think I was so close but I was misunderstanding a small part of your information.

Thank you again -- so now I am asuuming that I can continue to add domains but I set this up exactly the same way however I keep the name servers as they are but then I replace some of the other domain information with the appropriate domain.

bjs
 
For the other hosted domains, you would NOT need to put these:

ns1. cafeinsomnia. net. A 82.165.177.79
ns2. cafeinsomnia. net. A 82.165.177.79

So you would end up with something like the following for additional hosted domains:

otherdomain.tld. NS ns1.cafeinsomnia.net.
otherdomain.tld. NS ns2.cafeinsomnia.net.
otherdomain.tld. A 82.165.177.79
mail.otherdomain.tld. A 82.165.177.79
webmail.otherdomain.tld. A 82.165.177.79
*.otherdomain.tld. CNAME otherdomain.tld.
ftp.otherdomain.tld. CNAME otherdomain.tld.
www.otherdomain.tld. CNAME otherdomain.tld.
otherdomain.tld. MX (10) mail.otherdomain.tld.

This assumes you are using the same IP address as a SHARED IP for the hosted domains, otherwise you would change it to whatever IP you associate the domain with. I never know who has only single IP versus multiples....
 
AWESOME ---

Thank you so much! I feel like a little kid with a brand new toy.

If you don't mind me asking one small question.

In plesk is there a way to setup a new customer's site without the domain. For example, I just got a new client so I am setting up their site so I don't want their domain to go live. Do I basically setup a domain but do have them transfer the domain?

bjs
 
Assuming the domain is registered and already pointed to the main IP address of your server, then you could put an 'under construction' index.html file in the domain's docroot (/home/httpd/vhosts/domain.com/httpdocs), then during development, you would have an index2.html file which you would manually enter into the browser's address to bring up the development site.

If they have an existing domain being hosted elsewhere, then during your development on your server, their live domain would still have it's DNS pointed to the old hosting server, and you can create their domain and develop it normally. Then when all is done and finished, then submit registrar changes for their domain to point the nameservers to your nameservers.

(If this is not the case, then please clarify)

That way, anyone browsing to just the domain URL (http://www.domain.com) would get the 'under construction' page, but for you, you would go to http://www.domain.com/index2.html and get the development home page.

This is one quick workaround. Most people have the opposite problem, they want to be able to preview the new site before DNS has propagated (like on a newly registered domain name).

There are other methods, but those would require modifying the domain's vhost.conf file to do things like checking the IP address of the request and if it's not your IP, then redirect the apache request elsewhere. But you probably don't want to do all that...
 
Back
Top