0

I would like to have an address for my website like this : meteo.xyz.com

I own the domain xyz.com

I redirected the traffic from my domain to the digital ocean dns in my domain name provider :

meteo CNAME 1800 ns1.digitalocean.com.
meteo CNAME 1800 ns2.digitalocean.com.
meteo CNAME 1800 ns3.digitalocean.com.

I added a A record in digital ocean pointing to my server ip :

A meteo.xyz.com directs to [ip] 3600

My nodejs app is running at 127.0.0.1:8080 on my server.

I can see it when i do ss -nplut : tcp LISTEN 0 511 127.0.0.1:8080

I created an apache virtualhost containing this :

<VirtualHost *:80>
         ServerAdmin myemail@gmail.com
         ServerName meteo
         ServerAlias meteo.xyz.com
         DocumentRoot /home/myname/meteo/dist/
 <Directory />
         Options -Indexes +FollowSymLinks
         AllowOverride None
         Require all granted
 </Directory>
         ProxyRequests Off
         ProxyPreserveHost On
         ProxyVia Full
 <Proxy *>
         Require all granted
 </Proxy>
         ProxyPass / http://127.0.0.1:8080/
         ProxyPassReverse / http://127.0.0.1:8080/
         ErrorLog ${APACHE_LOG_DIR}/error.log
         # Possible values include: debug, info, notice, warn, error, crit,
         # alert, emerg.
         LogLevel warn
         CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

But when I load http at meteo.xyz.com it keeps saying "meteo.xyz.com took too long to respond"

C Taque
  • 123
  • 1
  • 1
  • 6
  • can you ping meteo.xyz.com ? and get a success message ? – Aravinda Apr 02 '20 at 21:28
  • I do, it pings ns2.digitalocean.com – C Taque Apr 02 '20 at 21:30
  • 1
    your cname is the problem. meteo CNAME 1800 ns1.digitalocean.com . metro should not point to ns1.digitalocean.com. it should point to root doman xyz.com – Aravinda Apr 02 '20 at 21:33
  • How do I do that ? – C Taque Apr 02 '20 at 21:46
  • since you have a public ip as A record for the meteo.xyz.com, just delete CNAME you added meteo CNAME 1800 ns1.digitalocean.com. meteo CNAME 1800 ns2.digitalocean.com. meteo CNAME 1800 ns3.digitalocean.com. all threee – Aravinda Apr 02 '20 at 22:06
  • I deleted the three CNAME in my domain name provider and it is the same – C Taque Apr 02 '20 at 22:10
  • You'd have to wait for the `TTL` (1800 seconds) for the caches to expire. (I'd recommend not using `CNAME`s at all until you have deeper understanding on DNS.) – Esa Jokinen Apr 03 '20 at 04:32

0 Answers0