cPanel website migration - 'Not Supported'

Operating System & Version
CENTOS 7.8 v88.0.13

Jeff_Mash

Member
Oct 1, 2006
17
2
153
I migrated our website from one server to another......both running WHM/cPanel on CentOS. The destination server is running: Apache 2.4, PHP 7.2, and PHP 7.3

After migration, our first problem was when we tried accessing the imported website (using http://XXX.XXX.XXX.XXX/~username/), it was taking us to the defaultwebpage.cgi page. We made the following changes to get rid of that:

Under EasyApache4, we TURNED OFF:
  • mod_proxy_fcgi
  • mod_ruid2
  • mod_cgi
  • mod_mpm_prefork
Under EasyApache4, we TURNED ON:
  • mod_suexec
  • mod_suphpmod_mpm_event
  • php72-php-soap
  • php73-php-soap
We also DISABLED "Apache mod_userdir Tweak" by unchecking all the boxes.

This allowed is to navigate to direct files now in our web directory. For example, this now works: somefile.txt

However, if we remove the reference to a txt file and just try to run the website as usual (which has the original imported .htaccess file), we get the "Not Supported" message.

For example, this doesn't work and gives the Not Supported message:
(We tried removing the .htaccess file just to see if that changed the behavior, but it didn't.)

Searching the forums, I saw this other thread ('After a Migration "Not supported" Message on website') which seems to describe the same "Not Supported" issue, but I think we have done all the suggestions there with the changes we made above.

The suggestion on that thread only said: "You will need to use another handler (e.g. suphp) if you want to utilize Apache Mod_Userdir"

We DO have the suphp mod enabled........so I'm not sure what else to do.

Any idea on how to get rid of this so that we can display the php/MySql website in this directory? Again, it works if we navigate directly to a txt file, but not a php file.
 

Jeff_Mash

Member
Oct 1, 2006
17
2
153
I may have resolved the issue......since it seemed like PHP was not being recognized/supported, I went to MultiPHP Manager --> PHP Handlers and I noticed it was set to cgi. I changed it to suphp, and that made the Not Supported message go away.

Now our php site loads (albeit poorly formated, so there is some other issue going on)........but at least I am seeing something that resembles our original website. I will keep playing around with it.
 
  • Like
Reactions: cPanelLauren

andrew.n

Well-Known Member
Jun 9, 2020
982
363
63
EU
cPanel Access Level
Root Administrator
  • Like
Reactions: cPanelLauren

Jeff_Mash

Member
Oct 1, 2006
17
2
153
Jeff, why don't you use your hosts file to review the site before taking it live? How to Modify Your Hosts File | cPanel & WHM Documentation should be easy peasy :)
Thanks Andrew.......Our server is on a CentOS, and my workstation here is windows. I edited the hosts file on my windows laptop, but I didn't see any change.

I basically added this line to it: 52.XXX.XXX.XXX mydomain.com

When I opened a new browser and navigated to the IP address, it still takes me to http://52.XXX.XXX.XXX/cgi-sys/defaultwebpage.cgi.

However, for testing, I ended up modifying the .htaccess file on the server to rewrite the domain, so it allowed me to navigate through the website even though my domain name was showing the longer temporary one.

I am just currently trying to contemplate if I should/could use the AutoSSL feature that is provided by WHM/cPanel, since my current certificate expires in 3 days! The only problem is that I can't see a way to test THAT PART, because the domain still points to my old server. So if I try to AutoSSL my domain on the new server, it gives an error which basically says the IP doesn't exist on that machine (which it doesn't).

So I think I need to point my domain to my new nameserver, wait for it to propogate, and then see if AutoSSL will assign it's free certificate to it. I wish there was a way to test out if that would work without doing it on a live website though.
 

andrew.n

Well-Known Member
Jun 9, 2020
982
363
63
EU
cPanel Access Level
Root Administrator
Yes you are right about AutoSSL, the domain needs to be pointed to the server before it can get a certificate for you. Make sure you also add www so like:

52.123.1.4 www.domain.com domain.com

and then give it a try. It also worth using Incognito to make sure what you see is not cached.
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Even when I'm testing sites here I do both the domain and www subdomain - just a good habit to get into in the event there are redirections to the www subdomain.
 
  • Like
Reactions: andrew.n

Jeff_Mash

Member
Oct 1, 2006
17
2
153
Thanks Lauren and Andrew! That helped out a lot!

Now I am in that scary place where I *think* I'm ready to point my domain registrar to my private nameservers........but I've never used my own nameservers before!

I created them in my WHM control panel (and added A records)......but if I do a DNS check on them, they aren't returning any results. Is there anyway to see if they are valid BEFORE I update the domain registrar?

The nameservers are ns1.mjmmagic.com and ns2.mjmmagic.com

When I go to https://dnschecker.org/#A/ns1.mjmmagic.com, it is not returning anything.

I read somewhere that the nameserver won't begin propogating until AFTER you update the domain registrar. If that's the case, then I guess I simply have to point the domain to those ns1/ns2 names, and then cross my fingers that the downtime is minimal. (I already updated the TTL on the WHM -> DNS Zone to 900).

Scary!!!

It's an ecommerce site, so I really want the transition to go smoothly so that we don't interrupt any online orders. After the domain goes to the new server, I will have to scramble to get the SSL up and running.
 

andrew.n

Well-Known Member
Jun 9, 2020
982
363
63
EU
cPanel Access Level
Root Administrator
There are 2 things you need to do before start using your own nameservers:

1. Register them as "nameservers" at your domain registrar. Quickly looking at your domain name this was registered at register.com so follow this documentation to register ns1/ns2.mjmmagic.com as nameservers:


2. Create subdomains of ns1 and ns2.mjmmagic.com and point them to your nameservers IP addresses (You can do so at ThePlanet.com as I see thats where mhmmagic.com is pointed to)

It is enough to do either option 1 or option 2 but I usually recommend both just to be sure all will be working fine then :)
 

Jeff_Mash

Member
Oct 1, 2006
17
2
153
There are 2 things you need to do before start using your own nameservers:

1. Register them as "nameservers" at your domain registrar. Quickly looking at your domain name this was registered at register.com so follow this documentation to register ns1/ns2.mjmmagic.com as nameservers:
Once I do THAT though, then doesn't that automatically start the process of redirecting my website visitors to the new site? In other words, I better be prepared to have my old site disabled and the new site ready to go when I update that information in Register.com, correct?

2. Create subdomains of ns1 and ns2.mjmmagic.com and point them to your nameservers IP addresses (You can do so at ThePlanet.com as I see thats where mhmmagic.com is pointed to)
It is enough to do either option 1 or option 2 but I usually recommend both just to be sure all will be working fine then :)
I believe that is already done. When I go to the new server ---> WHM --> Edit a DNS Zone --> Select Domain (mjmmagic.com), I see the following entries (among others):

Do you think those settings look correct?
 

andrew.n

Well-Known Member
Jun 9, 2020
982
363
63
EU
cPanel Access Level
Root Administrator
If the sites uses ns1/ns2.mjmmagic.com as nameservers then yes it is correct. The A records you set for the nameservers looks about right as well.
 

Jeff_Mash

Member
Oct 1, 2006
17
2
153
If the sites uses ns1/ns2.mjmmagic.com as nameservers then yes it is correct. The A records you set for the nameservers looks about right as well.
Oh boy, okay! I think I have to just bite the bullet and make the change at the registrar! Hopefully you will be here to bail me out if I run back with some questions! I am really, REALLY hoping that once the site is loading from the new server, that it will be a piece of cake to get the AutoSSL to generate a free certificate. That's because right now, the new site has no SSL on it because the domain name hasn't yet resolved to the new server IP.

Aggghhhh, this is crazy! I hope my head don't explode! Thank you SO MUCH for being available to offer your advice!
 

andrew.n

Well-Known Member
Jun 9, 2020
982
363
63
EU
cPanel Access Level
Root Administrator
Actually I was wrong. It will use the DNS records hosted on the new server where ns1/ns2.mjmmagic.com is pointed.
 

Jeff_Mash

Member
Oct 1, 2006
17
2
153
Actually I was wrong. It will use the DNS records hosted on the new server where ns1/ns2.myprivatenameserver.com is pointed.
The new server records are what I have supplied screenshots in my previous post. So you can see the ns1 and ns2 A entries are there. However, I ran into a snag. When I told the registrar to point to those nameservers, it gave an error that they both cannot be the same IP address. The IP I put in the A entries is the one shared IP for our server (52.117.227.114).

So I am currently in an online chat with IBM Cloud services to see if they can resolve how to give it a separate IP for the second nameserver.
 
Last edited:

Jeff_Mash

Member
Oct 1, 2006
17
2
153
Okay, just giving an update......I am mainly documenting this mess for my own reference......to either look back on and laugh, or look back on and learn!

The engineers at our hosting site (IBM) weren't really able to help since their DNS specialists were gone for the day.

So I took it upon my newbie self to TRY and see if I could figure it out. Here is what I did.

To recap, I am trying to setup my own custom private nameservers (ns1.myprivatenameserver.com and ns2.myprivatenameserver.com). What I think I did wrong was I initially assigned both of them to the server's main public IP address. That's a no-no. They have to be different addresses. But which ones?

So I went to WHM --> Add an IP Address, and I literally MADE UP two new IP addresses. Something like 192.168.1.100 and 192.168.1.101. Is that really how it's supposed to be done?!

The WHM page accepted them, so I assume that it's perfectly fine to reserve those for the server.

Next, I went to WHM --> Basic Webhost Manager, scrolled to the very bottom, and I updated my nameservers with those two new IP addresses for the A record.

So now, my DNS Zone looks like this:

MyDomain.com ---- NS record ------> ns1.myprivatenameserver.com
MyDomain.com ---- NS record ------> ns2.myprivatenameserver.com
ns1 ---- A record -------> 192.168.1.100
ns2 ---- A record -------> 192.168.1.101

I have NO IDEA if that is correct or not......time will tell if it will resolve. If you have any thoughts or feedback on if it looks correct, please share. I will update this thread when I get more info.
 
Last edited:

andrew.n

Well-Known Member
Jun 9, 2020
982
363
63
EU
cPanel Access Level
Root Administrator
This is not correct because those IP addresses are internal ones so they are not reachable from outside (from the internet). You will really need 2 IP addresses to use your own nameservers or alternatively you can ask your domain registrar to set nameservers which use the same IP but you will have the same issue if you move the domains to another provider or wants to point domains with another provider.
 
  • Like
Reactions: cPanelLauren

Jeff_Mash

Member
Oct 1, 2006
17
2
153
Okay, final update on this issue. I spent all this time trying to update nameservers, etc. In the end, it was much easier to use a generic PUBLIC nameserver (not a custom private one). So we contacted our hosting company (IBM Cloud) and they had to change the nameserver records on our DNS record. (We weren't able to do it because that record wasn't editable to us). Once they changed it, we updated our registrar and it's beginning to propagate.

The only thing left to do (concerning this particular issue) is we will update the DNS record to point to the new server's IP address, and HOPEFULLY that will be it!

The only big QUESTION MARK left is, "Once I go live on the new server, can I get the AutoSSL up and running to automatically renew our expiring certificate?" I may treat that as a separate thread here in the forums if I need help with it. You guys have been great!
 
  • Like
Reactions: andrew.n