Linux disable unneeded modules in Apache to save memory

Linux disable unneeded modules in Apache to save memory

To disable unneeded modules in Apache to save memory on a Linux system, you can use the a2dismod command.

  1. Determine the name of the Apache module that you want to disable. You can use the a2query -m command to list all the installed Apache modules:
refer‮tual:ot ‬turi.com
a2query -m

The output will list the names of the installed Apache modules.

  1. Use the a2dismod command to disable the Apache module:
sudo a2dismod MODULE_NAME

Replace MODULE_NAME with the name of the Apache module that you want to disable.

For example, to disable the rewrite module, you would run:

sudo a2dismod rewrite
  1. Restart Apache to apply the changes:
sudo systemctl restart apache2

Disabling unneeded Apache modules can help reduce the memory usage of the Apache server. However, keep in mind that disabling certain modules may also disable features that are required by your applications. Consult the documentation for your applications to ensure that they will still function properly after the modules have been disabled.

Created Time:2017-10-29 22:09:01  Author:lautturi