How to stop redirecting shared IP to a domain

Deker

Well-Known Member
Feb 15, 2011
99
4
58
cPanel Access Level
Root Administrator
The main IP is fine. Our problem is with one of our resellers IP address. The IP is redirecting to one of his domains.
Any idea how to stop the redirection and showing cgi-sys/defaultwebpage.cgi instead?
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
Deker,

2 things.

1. Can you confirm its a shared IP?

Go into WHM > Show/Edit Reserved IPs

Scroll down to said IP, does it say "Dedicated to" or "Shared IP address for"?

2. Does it only go to a specific website if you browse to the IP over https or it affects http as well?
 

Deker

Well-Known Member
Feb 15, 2011
99
4
58
cPanel Access Level
Root Administrator
Deker,

2 things.

1. Can you confirm its a shared IP?

Go into WHM > Show/Edit Reserved IPs

Scroll down to said IP, does it say "Dedicated to" or "Shared IP address for"?

2. Does it only go to a specific website if you browse to the IP over https or it affects http as well?
Hi Jcats,
1. It's a shared IP.
2. I just found http is ok. Only https is redirecting. How to fix this?
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
That's because of SNI, anytime you install an SSL on a domain that resides on a shared IP any domain that does NOT contain an SSL will automatically default to the first virtualhost in the Apache conf that DOES have an SSL.

You would want to either install SSL's on ALL domains, or what you can do is install your server hostnames SSL and then set that SSL as the Primary SSL.

Steps are:

-WHM > Service Configuration » Manage Service SSL Certificates
Click "Apply Certificate to Another Service" on any of the services, the boxes will prefill. Copy the first box "Certificate".

-Then go to WHM > SSL/TLS » Install an SSL Certificate on a Domain
Copy / paste the certificate into the Certificate box and click "Autofill by Certificate", all boxes will prefill.

In the "IP Address" box make sure to fill in the shared IP of the reseller.

Click Install.

-Finally, go to WHM > SSL/TLS » Manage SSL Hosts

Search for your server hostname, there may be more than one so find the one that is tied to the IP in question. To the far right column, click "Make Primary".

Now anytime you visit any domain over HTTPS(that does not contain an SSL) or https://IP you will be directed to the default cPanel page.
 

Deker

Well-Known Member
Feb 15, 2011
99
4
58
cPanel Access Level
Root Administrator
The first solution did not work. I installed SSL on all domains but it still redirects to the domain.
So I performed the second solution. In the "Manage Service SSL Certificates" there are only certificates for server hostname (for services such as cpanel,whm,webmail,exim,dovecot and ftp).
I clicked "Apply Certificate to Another Service" and then copied the certificate. But when I paste it into the "Install an SSL Certificate on a Domain" it says "The certificate does not match your selected domain."
The selected domain is the main reseller domain. Am I missing something? I think it's because the certificate is issued for main server IP.
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
The first solution did not work. I installed SSL on all domains but it still redirects to the domain.
You mean the domains you installed the SSL on still redirect to the other domain? or going to https://IP goes to the domain. If the latter, it means you have to change the Primary SSL in Manage SSL Hosts

I clicked "Apply Certificate to Another Service" and then copied the certificate. But when I paste it into the "Install an SSL Certificate on a Domain" it says "The certificate does not match your selected domain."
Yeah it will until you click the "Autofill by Certificate" button, not sure if you missed that. It will prefill the domain box with your server hostname. Then simply enter in the IP of the reseller account and hit install.
 
  • Like
Reactions: Deker