Apache service directory structure

Apache service directory structure

1. View the commands of the apache service as a whole

httpd -V
systemctl status httpd
---------------------------------------------------
Server version: Apache/2.4.43 (Unix)
Server built:   Apr 26 2020 10:47:17
Server's Module Magic Number: 20120211:92
Server loaded:  APR 1.7.0, APR-UTIL 1.6.1
Compiled using: APR 1.7.0, APR-UTIL 1.6.1
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_PROC_PTHREAD_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr/local/apache"
 -D SUEXEC_BIN="/usr/local/apache/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

2. Apache service default installation directory

/usr/local/apache

3. Apache subdirectory structure
1. Main configuration file: httpd.conf
Apache configuration file httpd.conf main content: refer to files in the extra directory through httpd.conf to load other configuration files

httpd.conf文件内包含的内容有:
apache的安装路径
ServerRoot "/usr/local/apache"	
apache服务端口
Listen 80	
apache的工程路径
DocumentRoot "/data/www/default"	
包含httpd-vhosts.conf文件
Include conf/extra/httpd-vhosts.conf				

2. extra directory

http-vhosts.conf文件:
包含/usr/local/apache/conf/vhost/*.conf文件
Include /usr/local/apache/conf/vhost/*.conf
httpd-info.conf文件:配置apache对外监听
http-default.conf文件:配置Timeout、KeepAlive、MaxKeepAliveRequests、KeepAliveTimeout等信息
httpd-mpm.conf文件:配置apache线程/进程工作模式
...文件都在httpd.conf中被包含

3. vhosts directory

default.conf文件			#默认的配置文件
www.xxx.com.conf		#具体的网站配置文件

Guess you like

Origin blog.csdn.net/dakhda/article/details/131271260