Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set Apache in linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about how to set Apache in linux. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

The settings file for the Apache server is located in the / usr/local/apache/conf/ directory, and three configuration files, httpd.conf, access.conf, and srm.conf, are traditionally used to configure the behavior of the Apache server. Httpd.conf provides the most basic server configuration and is a technical description of how the daemon httpd runs; srm.conf is the server's resource mapping file that tells the server the MIME types of various files and how to support them; access.conf is used to configure server access and control access restrictions for different users and computers These three configuration files control the characteristics of all aspects of the server, so they need to be set up in order to run the server properly.

In addition to these three settings files, Apache also uses mime.types files to identify the MIME types corresponding to different files. Magic files set some special identifiers for different MIME type files, so that when the Apache server can not judge the MIME type of the file from the document suffix, it can judge the MIME type of the document through these special tags in the file content.

[iaspec@www conf] $pwd

/ usr/local/apache/conf

[iaspec@www conf] $ls

Access.conf httpd.conf.OLD magic.default srm.conf

Access.conf.default httpd.conf.SAVE mime.types srm.conf.default

Httpd.conf magic mime.types.default

The new version of Apache puts all the configuration parameters in the original httpd.conf, srm.conf, and access.conf in one configuration file httpd.conf, using three configuration files only for reasons of compatibility with previous versions (the way these three settings files are used is derived from NCSA-httpd). There are no specific settings in the access.conf and srm.conf files provided.

Because in the new version of Apache, all the settings are placed in httpd.conf, you only need to adjust the settings in this file. This paper explains the various setting options of Apache server based on httpd.conf under redhat 7.2. of course, its configuration method can be extended to almost all unix systems.

Although Apache provides a number of set parameters, basically these parameters are clear, and you can run the Apache server without change. However, if you need to adjust the performance of the Apache server and add support for a feature, you need to understand the meaning of these setting parameters.

It should be pointed out that in addition to the performance adjustment of the operating system, the default configuration of the Apache server itself is by no means optimal and efficient, but to adapt to the settings under almost all kinds of operating systems and all kinds of hardware. Multi-platform software can not provide optimal default configuration for specific platforms and specific hardware. Therefore, performance tuning is essential when using Apache.

Quick access to this article directory:

The relationship between httpd.conf basic configuration and performance Optimization

Other acceleration methods

Appendix I. using mod_gzip to accelerate Apache

The relationship between httpd.conf basic configuration and performance Optimization

Httpd.conf first defines some parameters that the httpd daemon needs to run to determine its running mode and environment. The definition of configuration parameters in httpd.conf and its various configuration and optimization methods are explained item by item:

(there are no shortcuts to optimization, we must first understand the meaning of each configuration.)

ServerType standalone

The above is how to set Apache in the linux shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report