• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

a2enmod Command Examples in Linux

by admin

a2enmod is a command used to enable Apache HTTP Server modules on a Linux system. It stands for “Apache 2 Enable Module” and is part of the Apache HTTP Server package.

To use a2enmod, you must have administrative privileges on the system. The syntax for the command is:

a2enmod [options] module-name

Where module-name is the name of the module you want to enable.

For example, to enable the rewrite module, you would run the following command:

$ sudo a2enmod rewrite

This will create a symbolic link from the module file to the /etc/apache2/mods-enabled directory, which tells Apache to load the module when it starts up.

You can also use a2enmod to disable a module by using the -d option. For example, to disable the rewrite module, you would run the following command:

$ sudo a2enmod -d rewrite

This will remove the symbolic link from the /etc/apache2/mods-enabled directory, effectively disabling the module.

a2enmod Command Examples

1. Enable a module:

$ sudo a2enmod {{module}}

2. Don’t show informative messages:

$ sudo a2enmod --quiet {{module}}

3. To enable multiple modules at once, you can specify them as arguments to the a2enmod command, separated by spaces. For example, to enable the mod_rewrite and mod_ssl modules, you can use the following command:

$ sudo a2enmod rewrite ssl

Filed Under: Linux

Some more articles you might also be interested in …

  1. cd: Change the current working directory
  2. nsxiv Command Examples
  3. Understanding OS load average and run queue/blocked queue in terms of CPU utilization in Linux
  4. ldconfig Command Examples in Linux
  5. dvc: Data Version Control (like git for data)
  6. smbpasswd: command not found
  7. ebuild Command Examples in Linux
  8. How To Execute The Pstack Command On CentOS/RHEL
  9. Patch Management of Linux Servers Using Spacewalk
  10. ss: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright