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

What is the main configuration file of apache

青灯夜游
青灯夜游 Original
2019-06-12 18:40:42 20772browse

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 ~]#

The configuration file consists of three parts:

[root@justin ~]# grep '\' /etc/httpd/conf/httpd.conf -n 33:### Section 1: Global Environment 245:### Section 2: 'Main' server configuration 973:### Section 3: Virtual Hosts [root@justin ~]#

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!

Statement:
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
Previous article:What is apache used for? Next article:What is apache used for?