How to change default cpanel,whm,webmail,apache ports ?

azadhussnain

Well-Known Member
May 28, 2020
62
0
6
India
cPanel Access Level
Root Administrator
Hello, we are running a educational website and from last 2 days we are facing a lot of attacks.
we want to change default Apache Port ( 80 ) and does it affect anything on website? means does website goes down if we change apache port ?
and also i want to change cpanel,whm,webmail ports so that no one can try to login into them.
and also i want to ask that does NGINX protects from DDOS Attacks ?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,307
2,238
363
cPanel Access Level
Root Administrator
Hey there! You wouldn't want to change the Apache port to something other than 80 as that would cause all of your websites to go offline. If you are seeing a consistent series of attacks you may want to try something like mod_evasive to see if that helps:


If the attacks are too large for that module, you may want to look into a tool like Cloudflare as they help absorb the traffic from attacks to keep your site online.

Nginx would not protect from a DoS attack as it just proxies public traffic to Apache.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,307
2,238
363
cPanel Access Level
Root Administrator
As for the cPanel and WHM ports, you wouldn't be able to change those. It would be best to use the WHM >> Host Access Control functions to only allow trusted IPs to access those services. You can find more details on that here: