How to thoroughly Delete WDCP logs in linux: linuxwdcp

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.