SOLVED Call to UAPI install_ssl returns meta refresh to https

swbrains

Well-Known Member
Sep 13, 2006
154
19
168
Hi,

I just moved my site to a new cPanel server from an existing cPanel server (both CentOS 7). The old cPanel was v68 but this one shows v70 (don't know if it's relevant for this issue). I had a Perl script that worked fine on the old server by calling:

http://subdomain.example.com:2082/execute/SSL/install_ssl

during a POST method to send the CRT and KEY data to the API to install a wildcard cert on the given subdomain.

But on the new server, instead of returning valid JSON code, it returns an HTML page with a meta refresh command that points to the same URL above, but with HTTPS:.

This same call worked on the old server so I can't figure out if there's some different settings that cause this that I haven't set up on the new server or what else might be causing it. Is there a setting in cPanel that somehow causes redirects to a secure version of API calls?

I have checked the parameters being sent and they all appear correct:
-The domain is the subdomain and matches the one in the URL for the API call.
-The cert and key are valid data strings that match the certificate and key of the wildcard cert.
-The cabundle is blank but was also blank in the past when installing on the old server, so I don't know if that's a problem now for some reason.

Any ideas are greatly appreciated!

Thanks!
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,749
2,205
363
cPanel Access Level
DataCenter Provider
Twitter
Hello @swbrains,

Could you open a support ticket using the link in my signature so we can take a closer look at the affected system and attempt to reproduce the issue? You can post the ticket number here and I'll link this thread to the ticket.

Thank you.
 

swbrains

Well-Known Member
Sep 13, 2006
154
19
168
Thanks. Actually, I realized this was due to a setting in WHM->Tweak Settings. I believe it was "Non-SSL redirect destination" that affected the call and redirected it even though SSL wasn't installed yet. When I disabled SSL redirection, it worked.
 
  • Like
Reactions: cPanelMichael