Enable a required module (debian) for apache)

Source: Internet
Author: User
Enable a required module (debian) for apache-Linux Enterprise Application-Linux server application information. The following is a detailed description. If we compile apache on our own, it is easier to enable or disable a module. You only need to modify the apache configuration file. However, we have no reason not to install binary files. It is much easier to use apt-get.

However, apache will enable some modules by default for such installation. Generally, apache meets most of the requirements. However, our requirements must be uncertain. If we may use apache to implement the redirection function, we may need the alias and rewrite modules.

In fact, there are two types of modules in apache, one is compiled into apache in advance, the other is the module loaded when you run apache. You can use the following command to check which modules have been compiled by apache:

Apache2-l

In fact, there are two directories under the installation directory of apache2:

/Etc/apache2/mod-enabled/enabled Module
/Etc/apache2/mod-available/available modules in the current system

This is a piece in the apache configuration file. It is obviously used to load each enabled module and its configuration file, that is, all parameters in/etc/apache2/mod-enabled. load and. the end of the conf file.

# Include module configuration:
Include/etc/apache2/mod-enabled/*. load
Include/etc/apache2/mod-enabled/*. conf

Of course, do not forget to restart apache: apache2 force-reload.

You can use the following command to enable or disable a module:
A2enmod Module name
A2dismod Module name
In fact, its action is to create or delete the link file corresponding to a module in the/etc/apache2/mod-enabled/directory. You can also do this manually.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.