How to thoroughly Delete WDCP logs in linux: linuxwdcp
Both apache and nginx have default switch logs. One is normal access logs and the other is error logs,
Directory in
/Www/wdlinux/nginx-1.0.15/logs
/Www/wdlinux/httpd-2.2.22/logs
These two logs record all the normal and abnormal access log information.
It is also the domain name on all servers. Unless logging is enabled in the site management city, the corresponding site domain name logs will be recorded in another independent file.
Otherwise, the logs are recorded in these files. Therefore, they are default web server log files.
However, in general, this log is not necessary unless otherwise necessary, such as log analysis or other data statistics, it is good to disable the log.
If logs are enabled for the site, the default directory is/www/web_logs. Site logs are recorded as file names starting with the site domain name. Go to/www/web_logs and delete it.
You can set whether to enable the site log entries in the wdcp background based on the actual situation.
Close method:
1. Go to the WDCP background-system settings-click "Disable web default log"
2. Go to the above directory (/www/wdlinux/nginx-1.0.15/logs/www/wdli (www.111cn.net) nux/httpd-2.2.22/logs)
Delete Files starting with a and e:
# Rm-fr access_log
# Rm-fr error_log
3. Run/www/wdlinux/tools/web_logs.sh on/off // on or off (after wdcp_v2.5)
Or manually
How to disable nginx
Sed-I '/log_format/
Access_log off; '/www/wdlinux/nginx/conf/nginx. conf
How to disable apache
Sed-I's # CustomLog "logs/access_log" common # CustomLog/dev/null common # '/www/wdlinux/apache/conf/httpd. conf
Last
Restart apache
/Etc/init. d/httpd restart
Restart nginx
/Etc/init. d/nginxd restart
Run df-h to check whether the disk usage has been restored.
From: http://www.111cn.net/sys/linux/60676.htm
In linux, how does one batch delete logs in log files (logs have display time )?
Rm-f *
Delete all
In linux, how does one batch delete logs in log files (logs have display time )?
Do you want to delete the content in the log file?
It seems that no command is used to delete the content, but the landlord can write the log to another file to filter out the part to be deleted. For example, if you want to delete the log of the day 20110602, you can
Cat filename | grep-v "20110602"> newfile