By default, apache records all the web access request URLs in the access_log log. Each page contains a large number of static files, such as images, which results in fast expansion of access_log files, it has a certain impact on the server performance. At the same time, it is inconvenient for us to perform security analysis on access logs. Therefore, we can consider
By default, apache records all the web access request URLs in the access_log log. Each page contains a large number of static files, such as images, which results in fast expansion of access_log files, it has a certain impact on the server performance. At the same time, it is inconvenient for us to perform security analysis on access logs. Therefore, we can consider
By default, apache records all web access request URLs in access_log.LogsEach page contains a large number of images and other static files, resulting in fast expansion of access_log files, which has a certain impact on server performance.LogsSecurity Analysis is also inconvenient, so you can considerLogsRecordFilter. Edit the httpd. conf file and add the followingFilterRule: # fileter log: if visit images or static files, don't log
SetEnvIf Request_URI ". jpg $" filenotlog
SetEnvIf Request_URI ". gif $" filenotlog
SetEnvIf Request_URI ". bmp $" filenotlog
SetEnvIf Request_URI ". css $" filenotlog
SetEnvIf Request_URI ". txt $" filenotlogConfigurationJoinLogsFilterCondition: CustomLog "logs/access_log" common env =! Filenotlog checkConfigurationFile Syntax: [root @ weblogic bin] #./apachectl-t
Run Syntax OK to restart the apache process:
[Root @ weblogic bin] #./apachectl graceful ViewLogsThere should be no records of jpg, bmp, gif, css, and txt files not recorded above.