DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /usr/share>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/html/upgrade>
Options Indexes FollowSymLinks
Order allow,deny
IndexOptions NameWidth=255 Charset=UTF-8
Allow from all
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
Order allow,deny
AllowOverride None
IndexOptions NameWidth=255 Charset=UTF-8
Allow from all
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all granted
</FilesMatch>
LogFormat "%v:%p %a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%a %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
开启文件浏览的apache2配置文件
最新推荐文章于 2024-09-14 10:11:11 发布
这篇文章详细介绍了Apache服务器的配置,包括RuntimeDir、PidFile、超时设置、Keep-Alive选项,用户和组权限,以及针对不同目录的访问控制规则。重点讲解了错误日志、访问文件规则和各种日志格式。
摘要由CSDN通过智能技术生成