izghitu

Well-Known Member
Aug 9, 2006
62
2
158
Hi,

I am trying to make apache listen on the main server IP only and I changed the listen address in tweak settings. After I rebuild the httpd conf and restart it does not work because there's always a Listen [::]:80 directive that conflicts with my IP:80 directive.

Can you please tell me how do I remove that [::]:80 Listen directive?

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

Please use the following option to ensure Apache only listens on the IP addresses of you preference:

"WHM Home » Service Configuration » Apache Configuration » Reserved IPs Editor"

Thank you.
 

speckados

Well-Known Member
Hi.

I've several server and any has a Ip marked on "WHM Home » Service Configuration » Apache Configuration » Reserved IPs Editor"

But one server are the same problem.

Also after select IP form WHM, apache not work on any IP selected.

Code:
Listen [::]:80
You can clarify?

/https://dropbox.tamainut.net/owncloud/public.php?service=files&t=a0a40989f4c8e3bdbfce533cccced7db
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
Virginia Beach, VA
cPanel Access Level
DataCenter Provider
Screenshot URL isn't working.

Docs on the solution suggested by cPanelMichael:

https://documentation.cpanel.net/display/ALD/Reserved+IPs+Editor

There's a similar thread here:

http://forums.cpanel.net/f5/apache-still-listens-reserved-ip-301602.html

And here's an alternate solution:

Code:
cd /var/cpanel/templates/apache2
cp main.default main.local
The edit main.local to customize the Listen directive. Specifically, you're looking for this:

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 -%]
Then rebuildhttpdconf and restart.