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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. How To Disable Weak Cipher And Insecure HMAC Algorithms in SSH services for CentOS/RHEL 6 and 7
  2. Using vmstat to troubleshoot performance issues in Linux
  3. How to Install Oracle Linux (UEK-2) with btrfs as a root filesystem
  4. nginx 504 gateway time-out
  5. How to configure Partitioned Block Devices (Non-ASMLIB) And Assign Them To ASM
  6. CentOS / RHEL : How to Set up SFTP to Chroot Jail only for Specific Group
  7. mesg Command Examples in Linux
  8. Yum Command Fails with “Another app is currently holding the yum lock” in CentOS/ RHEL 7
  9. pvcreate error : Can’t open /dev/sdx exclusively. Mounted filesystem?
  10. CentOS / RHEL 6,7 : How to use yum history to roll back a yum update

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright