apache服务目录结构
一、整体查看apache服务的命令
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"
二、apache服务默认安装目录
/usr/local/apache
三、apache子目录结构
1、主配置文件:httpd.conf
apache的配置文件httpd.conf主要内容:通过httpd.conf引用extra目录下的文件来加载其他配置文件
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目录
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目录
default.conf文件 #默认的配置文件
www.xxx.com.conf #具体的网站配置文件