3

I have apache 2.2 with whm/cpanel installed on my server. When I look at the loaded modules list, I see:

core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
include_module (static)
filter_module (static)
deflate_module (static)
log_config_module (static)
logio_module (static)
env_module (static)
expires_module (static)
headers_module (static)
setenvif_module (static)
version_module (static)
proxy_module (static)
proxy_connect_module (static)
proxy_ftp_module (static)
proxy_http_module (static)
proxy_scgi_module (static)
proxy_ajp_module (static)
proxy_balancer_module (static)
ssl_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
info_module (static)
suexec_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
rewrite_module (static)
so_module (static)
ruid2_module (shared)
php5_module (shared)

I believe all modules starting with "auth" and "proxy" can be removed, but I'm not sure if that will corrupt cpanel. I know I need so_module, ruid2_module, php5_module and rewrite_module.

If you are someone who is technically inclined and heavily uses cpanel/whm, I'd like input from you. I just feel my module list is quite an overkill and I want to knock some items off to make apache run much faster and therefore make my websites run much faster in the long run.

I do have some sites that have pages that display contents of folders direct from apache so I'll need to keep the dir modules in.

I don't think I have any section where a window pops up asking a user for a username or password so I think I'll be safe to remove all modules starting with auth, but someone please confirm this is ok.

I don't use apache as a proxy and I doubt anyone else on the network requires proxy usage so I think its safe to remove modules beginning with "proxy".

One guy at http://haydenjames.io/strip-apache-improve-performance-memory-efficiency/ suggested what modules to add or what modules to remove but he doesn't take cpanel or whm into consideration in his decisions.

What would you suggest I remove?

I want to remove at least the useless modules so I can serve pages more quickly and to more users at once.

And is there a way to remove the static modules without recompiling apache?

My WHM version is 11.50.0 (build 30) if it helps.

2
  • You may be right about the proxy modules. I would not mess with the auth modules. Most in your list are necessary, but I do not know enough to answer especially in light of your using cPanel or other tools. It is quite a list!! It would be interesting to see what answers you get.
    – closetnoc
    Dec 1, 2015 at 3:09
  • You probably don't want to rebuild but litespeed or nginx offer faster speeds.
    – Abu Nooh
    Apr 9, 2016 at 11:57

1 Answer 1

1

The modules which come preloaded in Apache through cPanel are loaded to provide what cPanel believes is the most secure and stable web server for a host to use. Many of them are required for stable functionality of apache or cPanel themselves though cPanel obviously does not identify specifically which ones it depends on when it installs them anyway. To see what each module does to decide if it can be removed from your installation or not you can review the documentation for each module at https://httpd.apache.org/docs/2.4/mod/. Unfortunately the only person who can really say what is and is not needed on your server is you as the administrator (I assume) as you would know (also assumed) what the server is being used for and so in turn what modules are likely to be needed in your environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.