second site on 443 not responding

Hello,
I have came across a strange problem and am not able to get to its root cause,
I have enabled ssl on multiple sites on my server.
However ,
Only the first site (site1) is accessible
Other site with ssl enabled (site2) is not even responding on port 443… I have checked all the configuration, apache, ssl config files and others but unable to find the root cause…

For diagnosing i enabled ssl on site3 and that also isn’t responding [error time out on browsers]
Now, i disabled ssl on site1 to check if its related to ssl being binded on specific ip. This time too apache didn’t responded for other ssl sites but still is responding for site1 on 443 (https://example.com) with certificate error.
Site2 and site3 were still completely inaccessible !

Checked multiple times on different configurations but all other sites are only working on port 80 (http) and only site1 is responding for https.
Tried using SNI too , it works but it couldn’t make other sites respond…

Now i can’t even make apache stop responding to site1 on https… It just responds to site1 on https whether i enable it or disable it… Only on completely disabling ssl from server (disabling Listen:443 & removing all ssl configuration) it stops for site1. Now if i re-enable ssl on site2 only. It still doesn’t responds & as unexpected site1 again started responding to 443 with certificate of site2 and NO configuration is present for site1 in configuration file.

Why apache is not responding for other sites on 443 ?
Am i missing out something ??
Note : all sites are correctly active on http (80)

It’s a bit hard to follow all those tests you did without seeing the system for myself, so here’s some generic questions to try and find out what’s wrong in general:

Are you using the same IP for all your sites, or does each site have its individual IP? I presume the latter, because otherwise it’s next to impossible that Apache accepts connections and serves one site, but times out on another.

You can check whether Apache is listening correctly on all IPs using this command: netstat -tpln | grep :443 You should get one line for each IP, or a line with “0.0.0.0” saying it’s listening on all IPs.

Are the IPs correctly assigned to your interface? ifconfig -a will show the network configuration for all interfaces.

You can try pinging your server from the outside on all relevant IPs to see if it’s responding in general.

Hello Locutus,

No im not using separate IPs but Single shared IP to serve all my sites on my server.
And as i said all sites are functional on http (80) so i dont thing its related to incorrect IP config.

Sorry for the long paragraph above, i thought its essential to involve all relevant information with steps i already performed to diagnose it.

Hmm okay, I can’t really see how this is happening then. If Apache can serve one SSL site, it is listening on port 443 correctly. So the worst that can happen with your other sites is that Apache serves the wrong one. But as far as I know it cannot happen that a connection to it times out on another site.

It would be most efficient to do a screen sharing so that I can take a look at your system myself. Otherwise I’d have to guess what could be wrong and talk/write you through a lot of things to test. :slight_smile: If you can and wish to do that, contact me (user “Loc2262”) on Skype. I’m in timezone UTC+1.

Never Faced Such An Issue Before With Apache.

Have Messaged You On Skype
Shivang Tyagi (shivang_tyagi)

Thanx To Locutus !

It Was Cloudflare That Was Interacting With The Setup
Cloudflare Needs To Be Configured To Use SSL Properly.
Or Simply Switching It Off On Sections Where SSL is to be used solved the problem

Issue Resolved