Results 1 to 8 of 8
-
01-08-2014, 06:22 AM #1Junior Guru Wannabe
- Join Date
- Dec 2011
- Posts
- 32
How to remove cpanel and apache log files using command line
Hi,
Help needed, need a command line to remove cpanel and apache log from the server. thanks
-
01-08-2014, 07:04 AM #2Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
rm -rf /usr/local/cpanel/logs/
rm -rf /usr/local/apache/logs/
rm -rf /usr/local/apache/domlogs (Individual website logs)
I won't ask why... but there you go! Make sure you restart both cPanel and Apache to resume logging.RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
01-08-2014, 09:41 AM #3Junior Guru Wannabe
- Join Date
- Dec 2011
- Posts
- 32
-
01-08-2014, 09:56 AM #4Web Hosting Evangelist
- Join Date
- Nov 2001
- Posts
- 468
Try to recreate the deleted directories:
mkdir /usr/local/cpanel/logs/
mkdir /usr/local/apache/logs/
mkdir /usr/local/apache/domlogs/
and restart cPanel and Apache.---=== RoseHosting.com Admin ===---
Linux Server Management and Outsourced Web Hosting Support - linuxhostsupport.com
Managed Linux VPS Hosting - rosehosting.com
High Quality Linux virtual servers with lots of Guaranteed RAM and SSD space, Impeccable Service.
-
01-08-2014, 10:13 AM #5WHT Addict
- Join Date
- Nov 2011
- Location
- EU
- Posts
- 104
Have you contacted WHM/cPanel Inc.? Re-creating manually dirs might not work, as something else might be missing. You could try what RoseHosting said though.
BeltHosting.com Staff. Shared Web Hosting | Reseller Web Hosting | IRCD Hosting | psyBNC/sBNC/eggdrop/znc Hosting
xShellz Linux Shell & IRCD Hosting.
24/7 Live & Ticket Support
-
01-08-2014, 02:08 PM #6Web Hosting Master
- Join Date
- Jan 2008
- Posts
- 1,204
Was there any specific reason to delete those logs? I think recreating deleted log files with proper permissions should fix the issue.
|| Web Hosting Blog - Web Hosting security & latest web hosting industry Announcements
|| Web Hosting Discussion - A Web Hosting community
-
01-24-2014, 04:53 PM #7WHT Addict
- Join Date
- Jan 2014
- Posts
- 159
Try it by recreating the files/folder and run an upcp along with easyapache which should fix the issue.
-
01-24-2014, 06:13 PM #8Temporarily Suspended
- Join Date
- May 2013
- Location
- India
- Posts
- 747
Make sure you know what you are doing before running any commands! Also note that removing domlogs will flush the stats for all domains since last log processing. Recreating log dirs as RoeHosting said should fix the issue, unless you did anything else on the server. Just wondering why you need to clear the logs though.
Similar Threads
-
ip blocked in csf/lfd how to remove from command line?
By akasharya in forum Hosting Security and TechnologyReplies: 13Last Post: 05-28-2015, 04:32 AM -
Shell Command to remove older files
By xs-admin in forum Programming DiscussionReplies: 6Last Post: 07-18-2012, 11:56 AM -
add /remove blocks of IP via command line
By NoAgendas in forum Hosting Security and TechnologyReplies: 5Last Post: 08-14-2006, 03:21 PM -
perl - remove line command
By NetCloud in forum Programming DiscussionReplies: 8Last Post: 08-20-2004, 10:22 AM -
If a user doesn't need log stats, can you remove log path from apache?
By DWHS in forum Hosting Security and TechnologyReplies: 3Last Post: 04-04-2003, 11:32 AM