I want to load some modules for proxy configuration. I have the modules installed under /etc/apache2/mods-available/xxx

How do I load them into /etc/apache2/mods-enabled/xxx ?

In other words, in which configuration should this be placed?

LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so 

1 Answer 1


You can enable modules using a2enmod. For example:

a2enmod proxy

That command will create a symlink inside /etc/apache2/mods-enabled that points to the module in /etc/apache2/mods-available.

Likewise, to disable a module, use a2dismod. That command will remove the symlink from the mods-enabled directory.

Bonus tip: there exist similar commands to enable/disable sites: look at a2ensite and a2dissite.

  • 2
    So we do not need the "LoadModule" line at all? Feb 18, 2021 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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