创建file文件夹,生成txt测试文件
[root@VM-0-5-centos html]# echo "abc333" > file/b.txt
[root@VM-0-5-centos html]# ls file/
a.txt b.txt
创建exe文件
[root@VM-0-5-centos html]# touch file/a.exe
[root@VM-0-5-centos html]# ls file/
a.exe a.txt b.txt
查看log访问记录
vi /etc/httpd/conf/httpd.conf查看log文件位置
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error_log"
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
# default warn
LogLevel debug
LogLevel修改log文件级别
紧急程度 等级 说明
1 emerg 出现紧急情况使得该系统不可用,如系统宕机等
2 alert 需要立即引起注意的情况
3 crit 危险情况的警告
4 error 除了emerg、alert、crit的其他错误
5 warn 警告信息
6 notice 需要引起注意的情况,但不如error、warn重要
7 info 值得报告的一般消息
8 debug 由运行于debug模式的程序所产生的消息
如果指定了等级 warn,那么就记录紧急程度为1至5的所有错误信息。
标签:httpd,log,centos,warn,file,error,apache,服务器,txt From: https://blog.51cto.com/u_15621957/8292789