Dennys
By:
Dennys

I have a domain of a provider and a vps of dogitalocean.How i connect my domain to my vps?

August 28, 2015 2.1k views
DNS DigitalOcean PHP CentOS

Hi i have my own domain that I buy (ownhosting.eu).I have add the domain in the DNS section. In my vps i have installes cPanel & WHM.
I add my hostname into the setup of WHM.
I've created a cPanel account for me.I create some sub domains and I put the domain redirection to my vps ip.When I type for example dev.ownhosting.eu it say this error:
ERRNAMENOT_RESOLVED
I've create this sub domain also in the domain controller of my provider but anyway don't work.
This is my zone file :
$ORIGIN ownhosting.eu.
$TTL 1800
ownhosting.eu. IN SOA ns1.digitalocean.com. hostmaster.ownhosting.eu. 1440779151 10800 3600 604800 1800
ownhosting.eu. 1800 IN NS ns1.digitalocean.com.
ownhosting.eu. 1800 IN NS ns2.digitalocean.com.
ownhosting.eu. 1800 IN NS ns3.digitalocean.com.
ownhosting.eu. 1800 IN A 104.236.71.143
info.ownhosting.eu. 1800 IN CNAME ownhosting.eu.
dev.ownhosting.eu. 1800 IN CNAME ownhosting.eu.
downlaod.ownhosting.eu. 1800 IN CNAME ownhosting.eu.
forum.ownhosting.eu 1800 IN CNAME ownhosting.eu
I think that is not a problem of the zone file but a problem of cPanel or a problem of my provider.
Anyway when i type my Ip : http://104.236.71.143/dev (dev is the folde that contain the index.php) it says this error:

Not Found
The requested URL /dev was not found on this server.
Apache/2.4.16 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at 104.236.71.143 Port 80
Is it a problem of Apache?I have read the file .htaccess but i think is Ok.

My .htaccess of dev.ownhosting.eu:

RewriteEngine on
RewriteCond %{HTTPHOST} ^dev.ownhosting.eu$ [OR]
RewriteCond %{HTTP
HOST} ^www.dev.ownhosting.eu$
RewriteRule ^/?$ "http:\/\/104.236.71.143\/dev" [R=301,L]

What i can do?

4 Answers

Hi,

It looks like you haven't changed your nameservers for this domain to point to DigitalOcean's nameservers:

$ whois ownhosting.eu
...
Name servers:
        dns4.arubadns.cz
        dns.technorail.com
        dns2.technorail.com
        dns3.arubadns.net

So, you should log in to the registrar where you registered this domain and change the domain's nameservers there to:

ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com

I have change the NAME server.But now When i type the url (from my iPad with Safari) Safari Say: Safari can'T open this page because it doesn't found the server

Hi

In my case I have installed vesta panel on VPS instead of CPanel.

Well I created Child Name servers for my domain name.

ns1.mydomain.com it points to my server ip
ns2.mydomain.com it points to my server ip

I updated these name servers on my other domains and installed website on my vps and it worked fine.

I hope this helps

Have another answer? Share your knowledge.