Primary Domain gives "connection refused"

propopulus

Member
Jan 29, 2013
6
0
1
cPanel Access Level
DataCenter Provider
Hello,

I recently installed a CloudLinux WHM/Cpanel dedicated server in a business.

It is behind a router (with Static IP), port 80 is forwarded to the dedicated server, along with 2087,2083.

The fully qualified hostname works. "server.example.com:2087"

However, the domain name "example.com" is not working. It gives a "connection refused" error.

I have setup a cpanel account and it should be working. Does anyone know what I should do now?

-Thanks
 

kiraanmore

Registered
Feb 24, 2013
3
0
1
cPanel Access Level
Root Administrator
Re: Help: Primary Domain gives "connection refused"

Hello,

You should check below things.

1. If httpd service is running on your server. You can check this using below command :

/etc/init.d/httpd status

2. Check if port 80 is open on the server. Try to stop iptables and check your website.

To stop iptables use below command :

service iptables stop

If your website starts working, you would need to open port 80.
 

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
401
13
168
Latvia
cPanel Access Level
Root Administrator
Re: Help: Primary Domain gives "connection refused"

What is main IP for the server? I see obvious configuration conflict here.

Because your server is LAN-hosted - it must have local IP - and local IP is assigned to virtual host aswell (you can see it in "List accounts"). But in DNS domain must have public IP and therefore when you access example.com with public-ip - apache, that is configured with local-ip can not find it.

When you access WHM - server does not check for IP - basically it answers on a port, but apache does more IP/domain mapping..

It won't work without some workaround, manual I suppose.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
I am happy to see you were able to address the issue. Thank you for updating us with the outcome.