Home > Operation and Maintenance > Apache > What is the main configuration file of apache

What is the main configuration file of apache

青灯夜游
Release: 2019-06-18 11:05:27
Original
20928 people have browsed it

What is the main configuration file of apache

The main configuration file of Apache is /etc/httpd/conf/httpd.conf; all the configuration information of the Apache server is stored in the main configuration file httpd.conf. The contents of this file There are a lot of them. According to the wc command, there are 1009 lines in total, most of which are comment lines starting with #.

[root@justin ~]# wc -l /etc/httpd/conf/httpd.conf 
1009 /etc/httpd/conf/httpd.conf 
[root@justin ~]#
Copy after login

The configuration file consists of three parts:

[root@justin ~]# grep &#39;\<Section\>&#39; /etc/httpd/conf/httpd.conf -n 
33:### Section 1: Global Environment 
245:### Section 2: &#39;Main&#39; server configuration 
973:### Section 3: Virtual Hosts 
[root@justin ~]#
Copy after login

Analysis:

1), Global Environment---Global environment configuration, determines the global parameters of the Apache server

2), Main server configuration---main service configuration, which is equivalent to the default Web site in Apache. If there is only one site in our server, then we only need to configure it here.

3), Virtual Hosts---virtual host, the virtual host cannot coexist with the Main Server. When the virtual host is enabled, the Main Server cannot be used

The above is the detailed content of What is the main configuration file of apache. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template