Customize apache under gentoo-enable module and Configuration Structure

Source: Internet
Author: User
In gentoo, customize the apache-enable module and Configuration Structure-Linux Enterprise Application-Linux server application information. For more information, see the following. Apache is required to build a small information website in the past two days. Take the time to customize apache on gentoo.

The source code of the so-called gentoo version apache is consistent with that of the official version. The difference is that the module installation and uninstallation are completely gentoo-based. You only need to add and delete the corresponding tags in the USE tag.

The modules used during compilation introduce the compilation and installation of apache. Here we should mention that the USE mark for installing the apache module is not followed by apache, and a set of variables configured separately.

The following are some of the modules I need (even if the yellow variables are the list of modules needed during compilation), which should be very streamlined:



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // pic.yupoo.com/kenwug/670265cae318/medium.jpg'); ">

The above configuration is in/etc/make. conf

Dir specifies the default document
Mime Document Type Recognition
Authz_host some of the simplest permission commands, such as Order deny and allow
Rewrite Engine
Log_config access log
Mime_magic supplements the previous mime Document Type
Multi-thread Implementation of the worker apache Multi-path processing module MPM

You can crop all modules as needed. However, authz_host, mime, and dir modules must be added.

This can be seen in the apache ebuild description file of gentoo.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // pic.yupoo.com/kenwug/828305cae455/medium.jpg'); ">

The above configuration, located in/usr/portage/www-servers/apache/apache-2.2.9.ebuild

In gentoo, you can customize the apache module to be enabled and enable the apache module under gentoo by passing the-d xx parameter to the httpd process. Then, in the configuration file, add the configuration block package of function XX Label to enable or block a function. (Unlike Tags, The former involves a wider area)

All these blocked enabling parameters are in/etc/conf. d/apache2. Here is my enabled blocking settings.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // pic.yupoo.com/kenwug/061355cae7d7/medium.jpg'); ">

As shown in the preceding figure, only PHP5 and virtual hosts are enabled. In fact, apache of gentoo provides many parameters.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // pic.yupoo.com/kenwug/497095cae980/zajrotb7.jpg'); ">

Configuration and deployment structure the configuration file deployment structure of apache for gentoo version is flexible in my opinion.

It subdivided all functional module configurations based on different functions.

The directory structure is roughly
Directory of/etc/apache2/apache core configuration file httpd. conf
/Etc/apache2/modules. d/directory of each configuration file of the apache module
/Etc/apache2/vhost. d/directory of the apache Virtual Host Configuration File
Some keys used by/etc/apache2/ssl https



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // pic.yupoo.com/kenwug/805475caebf7/cipalwb8.jpg'); ">

Take a closer look at the configuration in the modules. d directory. You can find that these configuration files are composed of serial numbers and each module name.

The serial number is mainly used to control the loading sequence (guaranteed by the linux File System). The module name is, of course, the configuration of this module is concentrated in the current file. Flexible.
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.