Updating Server IP

Hello! Cloudflare’s NS have been assigned to the domain registrar, and the site was on. Then I migrated from hostihg1(shared) to hosting2(VPS), and changed both A-records (@ and www) with hosting2 server IP on Cloudflare account. 72 hours have passed, but still nslookup site.com command points to the server Ip of hostihg1 (old hosting). Is it about Cloudflare? New hoster? Old hoster? I am confused, what to do.

Are you certain that you see the old host’s IPs and not Cloudflare’s? What is the domain?

I am supposed to see the IP of new hoster server, I pointed in Cloudflare’s account, don’t I? And I see on making nslookup homeproxy.pro command address, that starts from 104. that belongs to the old hoster.

That does sound like one of Cloudflare’s IP addresses.

That depends on whether the record is set to proxied or DNS.only. Proxied means you see Cloudflare IPs, DNS-only means you see your IP.

Edit: Missed the domain on the first read. It is actually proxied, so the IPs you see are both Cloudflare’s.

homeproxy.pro.          300     IN      A       172.67.151.210
homeproxy.pro.          300     IN      A       104.21.56.132
;; Received 74 bytes from 172.64.35.218#53(troy.ns.cloudflare.com) in 4 ms

In proxied mode, while the visible IP address does not change, the target IP changes in sub 30 seconds typically. Is the site working with the new settings? If not, what is the error?

2 Likes

Yes, you are right. I stopped it by pushing Proxied and it showed new hoster server IP. Proxied site does not open, and with DNS only Apache2 “Ubuntu Default Page” is readable…

Proxied site does not open (The page isn’t redirecting properly), and with DNS only “Apache2 Ubuntu Default Page” is readable…

The “too many redirects” error is usually fixed by changing your SSL mode in Cloudflare from Flexible to Full (strict).

After doing so, you probably have to install a certificate on your server, for example:

Have you added your domain to the VirtualHost that serves your website? Otherwise, you would see the default page for an unknown domain.

<VirtualHost localhost:443>
	ServerName example.com
	ServerAlias www.example.com
1 Like

The “too many redirects error is usually fixed by changing your SSL"… - I turned from flexible to full and “Ubuntu Default Page” from /var/www/html directory appeared. But the index.html from /var/www/homeproxy.pro/public_html directory remains unreadable.

Yes, I did, but using http for now. Like this:

<VirtualHost *:80> 
ServerName example.com
ServerAlias www.example.com
</VirtualHost>

That should be 443 instead of 80. Your configuration for port 80 will not matter.
You will also need a certificate configured if you have not done so already.

Also, it should be Full (strict), not Full.

<VirtualHost *:443> 
    ServerName example.com
    ServerAlias www.example.com

    SSLEngine on
    SSLCertificateFile /path/to/public.cert
    SSLCertificateKeyFile /path/to/private.key
</VirtualHost>
1 Like

Changed to 443 and Full (strict). For now no changes happened. Probably, I should take care about SSL cert to make changes take effect.
Bonus question for you, Laudian, if you please:

  • Is it matter, where to place site files (to site.com directory or site.com/public_html)? -And can I use the same certificate for multiple sites?

Yes, something did happen. Your site now shows a Cloudflare “Invalid SSL certificate” error, which is what we should see until you have installed the certificate and enabled SSLEngine.

The certificate is used for a domain, not for a site. If other sites use the same domain, they can use the same certificate.

You put the files into whatever directory you have specified in the DocumentRoot directive. Though these questions are really more getting into server-administration territory. You should maybe look at some basic Apache tutorials.

1 Like

[quote=“Laudian, post:15, topic:564732”]
Your site now shows a Cloudflare “Invalid SSL certificate
[/quote] Where did you find this error?

It’s not really important though. Just get the origin certificate from Cloudflare, install it on your VirtualHost and enable SSLEngine.

1 Like

Strange, I have “Apache2 Ubuntu Default Page” instead of “Invalid SSL” page with cleared browser cash… Anyway, I got, that I have to work on cert, to move on forward. Thanks a lot for your professionalism, to you and to cscharff answers.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.