Listen 0.0.0.0:80 not configured anymore

roliboli

Active Member
Sep 3, 2003
43
1
158
Switzerland
Hi

After installing a fresh Cpanel 11.30.1 the generated httpd.conf ist slightly different than another server before.
Before there was in httpd.conf:
Code:
# Defined in /var/cpanel/cpanel.config: apache_port
Listen 0.0.0.0:80
now I see that the in the file /var/cpanel/templates/apache2/main.default is an if/else
Code:
[% IF configured.ip_listen -%]
[%- FOREACH ip IN configured.ip_listen -%]
Listen [% ip %]:[% configured.main_port %]
[% END -%]
[% ELSE -%]
# Defined in /var/cpanel/cpanel.config: apache_port
Listen [% main.listen.item.listen %]
[% END -%]
The problem is, that on the new server for the main IP (not the shared one) there is no Listen generated. So can you explain where/why the variable configured.ip_listen is different configured than another server?

Thanks Roland
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
So you are not getting "Listen 0.0.0.0:80" in httpd.conf but something else? What are you seeing if not that in the Apache configuration file?
 

roliboli

Active Member
Sep 3, 2003
43
1
158
Switzerland
I get three IPs (at the moment):
127.0.0.1:80
62.x.x.x
93.x.x.x
So this IPs must out from "configured.ip_listen". One of these IP is the shared main IP and the other through "add IP address". But I don't know why thats different to another server.

Thanks Roland
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
What do you have set in WHM > Tweak Settings > Apache non-SSL IP/port section? On my machine, which shows the 0.0.0.0:80 entry, I have this set there:

0.0.0.0:80 default
 

roliboli

Active Member
Sep 3, 2003
43
1
158
Switzerland
Yes there is "0.0.0.0:80 default" activated. I tested with another IP but that didn't worked. So changed back to this default didn't change anything either.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
I'm trying to understand what the issue is precisely here, though. You have a different IP for your main IP than you do for your shared IP on the machine?

Do you have any IPs reserved in WHM > IP Functions > Show/Edit Reserved IPs area?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
I'm trying to determine how it gets populated. It is likely best if you open up a ticket in WHM > Support Center > Contact cPanel or using the link in my signature. It might be due to differences in CentOS 6 possibly, so a ticket should help us better understand what is going on. If you could post the ticket number here upon opening one, that would be helpful.
 

roliboli

Active Member
Sep 3, 2003
43
1
158
Switzerland
FYI: I get the support from cPanel with this solution:
----
In WHM under "Service Configuration >> Apache Configuration >> Reserved IPs Editor" there are IP's set to be reserved which won't be bound to Apache and why the Listen 0.0.0.0 statement isn't used present'y. If these were unchecked and then httpd.conf rebuilt then the listen statement would go back to 0.0.0.0.
----
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
I had asked about this previously and was informed you didn't have any reserved IPs:

Do you have any IPs reserved in WHM > IP Functions > Show/Edit Reserved IPs area?
Your reply:

No, there are no reserved IPs.
So, someone went to Apache configuration and did reserve IPs. Did someone besides yourself setup the server? Just wondering how the IPs ended up reserved otherwise.
 

roliboli

Active Member
Sep 3, 2003
43
1
158
Switzerland
Hi Tristan

The point I realizied is that there are two configurations:
Code:
WHM >> IP Functions >> Show/Edit Reserved IPs
WHM >> Service Configuration >> Apache Configuration >> Reserved IPs Editor
So do you asked about "Show/Edit Reserved IPs" where no IPs were reserved. But in the other configuration "Apache Configuration >> Reserved IPs Editor" was an IP reserved which I didn't know.

regards Roland