Apache配置 4.访问日志

(1)介绍

访问日志作用很大,不仅可以记录网站的访问情况,还可以在网站有异常发生时帮助我们定位问题。

(2)配置

# vi /usr/local/apache2.4/conf/extra/httpd-vhosts.conf

    ErrorLog "logs/111.com-error_log"

    CustomLog "logs/111.com-access_log" common

(3)配置验证

# curl -xlocalhost:80 2111.com.cn -I

#tail /usr/local/apache2.4/logs/111.com-access_log

 

posted @ 2021-03-08 17:13  清空。  阅读(87)  评论(0)    收藏  举报