Call Script That Deletes Logs After Stats Run Manually
Jan 15, 2008
I'm trying to create a script to archive logs for 7 days but still delete them from the domlogs daily. Has someone already done this? The ideal solution would be to modify the CPanel script that deletes them after stats run but I'm not sure if thats protected code by CPanel. The other option would be to disable the delete logs after stats run option and to create a script to copy the logs somewhere else via cron and call the script that CPanel uses to delete the logs without restarting apache. This script would also move the files through directories and eventually delete them, therfore preserving the logs for 7 days. Any ideas?
I have created an untested script which should do this but I just need to know how CPanel deletes the logs without restarting apache.
#!/bin/sh
mkdir /domlogbackup/
mkdir /domlogbackup/1/
mkdir /domlogbackup/2/
mkdir /domlogbackup/3/
mkdir /domlogbackup/4/
mkdir /domlogbackup/5/
mkdir /domlogbackup/6/
mkdir /domlogbackup/7/
mkdir /domlogbackup/8/
sleep 1
rm -rf /domlogbackup/8/*
sleep 5
mv /domlogbackup/7/* /domlogbackup/8/
mv /domlogbackup/6/* /domlogbackup/7/
mv /domlogbackup/5/* /domlogbackup/6/
mv /domlogbackup/4/* /domlogbackup/5/
mv /domlogbackup/3/* /domlogbackup/4/
mv /domlogbackup/2/* /domlogbackup/3/
mv /domlogbackup/1/* /domlogbackup/2/
sleep 5
cp /usr/local/apache/domlogs/* /domlogbackup/1/
sleep 0.1
# rotate domlogs
sleep 10
gzip /domlogbackup/1/*
View 2 Replies
ADVERTISEMENT
May 23, 2008
I look after a number of sites and monitor their stats. We use both webalizer and AWSTATS so we can have a comparison. Up until recently the stats for both of them where relatively the same, webalizer usually showing higher numbers as it doesn't filter bots but the progression of increase and decrease in stats was proportional. However, over the last few months a curious trend is appearing, the stats in AWSTATS are decreasing every month whereas the stats in Webalizer are increasing, the gap between them now is huge.
View 0 Replies
View Related
Jul 26, 2008
I'm on a VPS and every day I get the following message if I loginto WHM:
The server was unable to lookup an an A entry for its hostname (vps.glse.net). This is generally because the entry was never added. However this could also be the result of your nameserver(s) being down. If you would like to attempt to automatically add the entry
After that I add the A entry, and setup the Resolver and restart BIND, after that it is usually working again until I have to do it again the next day.
The hostname (vps.xxxx.net) resolves to . It should resolve to 72.18.xxx.xxx. Please be sure to correct /etc/hosts as well as the 'A' entry in zone file for the domain.
Some are all of these problems can be caused by
/etc/resolv.conf being setup incorrectly. Please check this file if you
believe everything else is correct.
my /etc/hosts
72.18.xxx.xcentos-cp--template
72.18.xxx.xxxvps.xxxx.net vps
72.18.xxx.xcentos-cp--template.xxx.com centos-cp--template
72.18.xxx.xxxvps
127.0.0.1localhost
my resolver.conf
nameserver xx.xxx.xx.xxx
=> I tried adding the nameservers from the server here but that didn't help so I had to use that of the hosting company
The A entry is empty, as stated in the mail,
View 9 Replies
View Related
May 31, 2009
This is on a RHEL 4 Box.
I want to create a cron job that deletes backup files that are older than 5 days. I have created a shell script (/usr/local/src/runjob.sh) that runs successfully from the SSH command line:
Code:
#pwd
/usr/local/src
#./runjob.sh
Here is the script:
Code:
#!/bin/sh
#
#
find /usr/local/apache/sites/*/BACKUPS/ -maxdepth 1 -atime +5 -iname 'test*.txt' -exec rm {} ;
Script has 777 permissions and is owned by root.
I have the following entry in crontab:
Code:
10 12 * * * /bin/sh /usr/local/src/runjob.sh >/dev/null 2>&1
As shown in the cron log, the job does run, but it does not delete the files. And there are files older than 5 days in the directory that meet the find criteria.
View 12 Replies
View Related
Jul 25, 2007
is it possiable to delete these files in the server access_logs and errors_logs
View 1 Replies
View Related
Mar 26, 2009
We are a web company that currently has a WHM/cPanel server that we manage ourselves. However, we are looking for a service that will be on call for us 24/7 in case something were to go amiss and our technical team was not available to restart services, restart the server or do whatever technical troubleshooting was required to get things back up and running quickly.
View 2 Replies
View Related
Aug 19, 2008
I have a managed dedicated box in Liquidweb for nearly 1 year and never call them by phone. Don't get me wrong, they have very good server and support via ticket so far until recently the server is getting ddos attack and have to be null route an ip address on the server.
I have a ticket about this issue and communicate back and forth however the ddos attack is very strong and the null route have to be continue. After many hours of null route, I decided to request to remove it to see if the ddos attack have been gone. As usual I submit the request through the old ticket but not getting any response after more than 30 minutes. I think the person in charge might be busy so I lift up my phone and call to Liquidweb for reminder of the message in the ticket.
Surprisingly the person who pick up the phone ask for the password of my account or the last 4 digits of my credit card number. I told him that I don't pay by credit card (I used paypal to pay) and he keep asking me my Liquidweb account password for verification purpose. I was stucked there because I don't know whether it is correct step to giveaway my Liquidweb account password? I finally told him that I will open a new ticket to remind them to reply to the message in the old ticket and hang up the phone.
Any Liquidweb customer here who have called them via phone support? Kindly share your experience here. Is the procedure to get account password for verification was one of the correct steps?
View 6 Replies
View Related
Nov 3, 2014
I am developing new module and installed SSL certificate using following API call.
Request call:
<packet>
<certificate>
<install>
[Code]....
But when i checked this domain by open in browser. the certificate is not installed. After lots of R&D i found that there are option of select SSL in hosting setting screen. The default selected SSL is "default certificate".
I have changed this option to "not selected".
After this changes i have installed certificate again and it is working fine. So is it bug in plesk or it is default behavior Plesk Panel?
View 4 Replies
View Related
Aug 16, 2008
Fatal error: Call to undefined function: imagettfbbox()
I am getting the above given error message.
View 1 Replies
View Related
Feb 22, 2007
I've been struggling with IIS continuously.
I simply cannot get things to work on it like it's supposed to.
Right now...PHP is running fine...but MySQL won't work.
I've been searching Google for the past 12hours trying to fix this, but it won't budge.
In my "php.ini" file, I enabled the "php_mysql.dll" extension.
I've also tried several other things, but nothing works.
View 3 Replies
View Related
Sep 7, 2007
I'm searching a server monitoring software which can call a phone of a technician. Either by isdn or with gnokii mobilephone.
The software should tell then on the phone which server is down or which service is down.
Is something like this already existing?
View 9 Replies
View Related
Nov 15, 2007
Approx how many COD4 slots do you think i could get on the following spec server
Intel Core 2 Quad Pro Q6600 2.40GHz (1066FSB)
80GB Raptor 10,000RPM
2GB DDR2 RAM
Linux OS or Windows XP Pro (not sure if I will fork out the extra for windows or not yet)
100mbit uplink
I'll be co-locating this to a DC.
View 11 Replies
View Related
Sep 25, 2014
sometimes my server doesn't forward emails to other accounts, and I see in log file:
Sep 25 07:38:55 s17218468 /usr/lib64/plesk-9.0/psa-pc-remote[1151]: handlers_stderr: DEFER
Sep 25 07:38:55 s17218468 /usr/lib64/plesk-9.0/psa-pc-remote[1151]: DEFER during call 'grey' handler
Sep 25 07:38:55 s17218468 /usr/lib64/plesk-9.0/psa-pc-remote[1151]: Message aborted.
If I restart the server it works.
View 3 Replies
View Related
Mar 2, 2008
I have a dedicated server. It is a Fedora Core 6. It came with "Plesk 30 domain license". However, this license of Plesk doesn't have SpamAssassin enabled. In order to get the license with SpamAssassin, it costs an extra $30 a month.
I believe SpamAssassin by default is in fact installed on the sever, but some of my users are reporting that they are getting Spam. How can I check is SpamAssassin is running? How do I configure SpamAssassin to filter spam on all the e-mail addresses that are created in Plesk?
I have SSH access to the server.
View 3 Replies
View Related
Jul 8, 2008
how to install CentOS by not using the installer. This guide should be great when installing over networks, don't have a graphical console available (for installing over serial), when you're not content with the installer's job, installing CentOS from another distro, or plainly want to learn more about how CentOS works.
Requirements:
* Have a host OS that has the "rpm" package manager available. Some distributions have it in their repositories (even if the package manager for the distro itself is not rpm), and knoppix (a linux live/rescue CD) has it aboard too. You can use the first CentOS ISO CD too (use linux rescue at boot), and it has all the necessairy packages aboard
* Access to the CentOS base repository. It's on the first CentOS ISO CD
* Use your BRAIN. This guide is ment to be interpreted, not copy/pasted
Code:
# First, setup your disks to your liking. You can use whatever you want here,
# RAID, LVM, etc... Remember your disk configuration because you'll need it
# to configure grub, menu.lst and fstab. Using RAID, LVM, or others will require
# more configuration than this guide covers. To keep it simple I'm using a
# single disk. An example:
$ fdisk /dev/sda
$ mount /dev/sda3 /target
$ mkdir /target/boot
$ mount /dev/sda1 /target/boot
# Depending on the host OS you're using, you may need to initialize the rpm db
# on the host OS
$ rpm --initdb
# Use the following command to install the packages. I'll be addressing this
# command as $rpm.
$ rpm --root /target -i
# Use your shell's tab completion to complete the package filenames. I
# deliberatly left out the versions so these instructions apply to a wide range
# of versions
# Let's install some basics
$rpm setup basesystem filesystem
# Install bash first, this is needed for post-install scripts
$rpm bash glibc glibc-common termcap libgcc tzdata mktemp libtermcap
# Install some dependencies (this is mainly to keep the next command smaller)
$rpm grep pcre libstdc++ info ncurses zlib gawk sed ethtool
# Install the bulk of the system
$rpm coreutils libselinux libacl libattr pam audit-libs cracklib-dicts
cracklib libsepol mcstrans libcap chkconfig python db4 openssl readline
bzip2-libs gdbm findutils krb5-libs initscripts util-linux popt udev MAKEDEV
centos-release shadow-utils keyutils-libs iproute sysfsutils SysVinit
net-tools module-init-tools e2fsprogs e2fsprogs-libs glib2 mingetty
device-mapper sysklogd psmisc centos-release-notes procps libsysfs iputils
# Install package manager
$rpm rpm beecrypt elfutils-libelf rpm-libs sqlite
# Install YUM
$rpm yum python-elementtree rpm-python yum-metadata-parser python-sqlite
expat libxml2 python-urlgrabber m2crypto python-iniparse
# You may also want to install your favorite editor
$rpm nano
# This provides /root with some defaults, like color highlighting on `ls`
$rpm rootfiles
# Right now you have system which you can chroot to, so we can start setting up
# the basics
# Mount directories for chroot operation
$ mount --bind /dev /target/dev
$ mount -t proc none /target/proc
$ mount -t sysfs none /target/sysfs
$ chroot /target
# This constructs /etc/shadow
$ pwconv
# Configure fstab
$ nano -w /etc/fstab
# Installing the kernel. Do this back outside the chroot in the host OS system
$ exit
$rpm kernel mkinitrd cpio device-mapper-multipath dmraid gzip kpartx lvm2 nash
tar less device-mapper-event
# Install the bootloader, grub.
$rpm grub diffutils redhat-logos
# Let's chroot again to configure our bootloader
$ chroot /target
# We start by configuring the bootloader. Open /boot/grub/menu.lst, and put the
# following there
<<<MENU.LST
timeout 5
default 0
# (0) CentOS
title CentOS
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 root=/dev/sda3 ro
initrd /initrd-2.6.18-92.el5.img
>>>
# If this command gives an error, you can safely ignore this because it's not
# of importance. What is important is that grub-install copied the right files
# to /boot/grub that we need for booting.
$ /sbin/grub-install /dev/sda
# Manually install grub if the previous step failed. - means type it in the grub
# shell
$ grub
$- root (hd0,0)
$- setup (hd0)
# Optional packages
# You may want to install passwd so you can set passwords ;-)
$rpm passwd libuser openldap cyrus-sasl-lib
# These are used to set the keyboard language (loadkeys)
$rpm kbd usermode
# ** Right now you should have a bootable system! Here are some tips to help you
# through your 1st boot ***
# Most of the system configuration happens in /etc/sysconfig. See
/usr/share/doc/initscripts
for full documentation.
Some quick post-install tips:
* Configure your keyboard in
/etc/sysconfig/keyboard
using the KEYTABLE variable
* Configure networking
Take a look at /etc/sysconfig/network-scripts. See ifcfg-lo for an example.
# This recreates the RPM database. If the host OS you used has a different
# version of db, rpm will complain with
# rpmdb: unable to lock mutex: Invalid argument
$ rpmdb --rebuilddb
View 2 Replies
View Related
Jan 27, 2007
I do not have control panel, I have suse OS, how do I setup an account manually so I can move my site to this new server?
View 2 Replies
View Related
Jul 24, 2007
we're using a subdomain to point to one of our server's IP. (gaming purposes).
And people use this subdomain to connect to the game server.
However, We are going to move to a new server soon with a different IP.
I know, only thing I have to do is change the IP of the subdomain to point to the new server, however I know this will take like 1 to 48 hours to fully work.
Is there a way to force people who's still connecting to the OLD Ip to go to the new IP?
View 6 Replies
View Related
Oct 26, 2007
Is there a way to block ips with mod_evasive by adding the ips to the mod_evasive configuration file?
View 3 Replies
View Related
Mar 30, 2009
I'm getting the following error when I'm trying to access Fantastico from cPanel:
Fatal error: Call to undefined function get_output() in /tmp/cpanel_phpengine.1238461774.28418Q1lWZzC0r_ on line 971
I have safe_mode set to On and shell_exec function disabled. When allowing shell_exec and safe_mode Fantastico is working in this server.
But I have many server where safe_mode set to On and shell_exec function is disabled and Fantastico is running just fine.
View 1 Replies
View Related
Jun 18, 2014
As per title, since few I have this when some php funcion is calling zlib_encode :
PHP Fatal error: Call to undefined function zlib_encode()
I saw that is was a know bug when there are some rewrite rules on .htacccess which is my case [URL] ....
I checked for json as well, and seem to be activated :
json
json support => enabled
json version => 1.2.1
View 1 Replies
View Related
Aug 21, 2014
'ERROR: Call to a member function getDomainId() on a non-object (Sites.php:104)'
View 6 Replies
View Related
Feb 17, 2008
How many of you cpanel folks are using the new cpanel 11 "EasyApache 3" to manage apache/php on your servers? (Instead of doing things manually?)
We have always managed our apache and php configs manually, because cpanel was "under-powered" for the task.
However, with this new EasyApache 3 that is included with cpanel 11, it seems cpanel might finally have figured things out.
How many of you have switched over from doing things yourself manually to using EasyApache to manage your PHP config?
View 5 Replies
View Related
Oct 24, 2007
Does anyone know how to make sub domains through SSH?
View 4 Replies
View Related
Aug 24, 2007
I have put an Access database inside an access_db folder on Godaddy and written some .asp pages that query it. I am trying to make sure that I take necessary precautions against hackers reading or even writing to the database. Maybe someone can give some remarks about whether any of these concerns are realistic, and if so, why and what I could do about it?
1) Could someone somehow navigate directly to the database and read or write to it (the access_db folder seems to have no read/write permissions as set by default by Godaddy, but how secure is that?)
2) I permit entry through use of a a userid and password that are looked up in an mdb in the same folder (not listed in the html itself). If there’s a match, I store the userid as a session cookie. Then, to visit any other pages, each page first checks to see if the cookie is empty before proceeding. Is it possible for someone to set the cookie themselves and thus break through (can a cookie be set manually?) If so, would it help if I mandated that the cookie be set to something specific (right now it just has to be non-blank) or can they find out what the cookie should be set to as well?
View 3 Replies
View Related
Feb 1, 2007
Does anyone know the step by step procedure for compiling apache with phpsuexec enabled and making apache recognize php on a non-cpanel server?
View 0 Replies
View Related
Nov 10, 2014
I have an error that has arisen me for no apparent reason. This error does not allow me to enable or disable DNS domains. I searched for solutions but have not found anything.
The error message is: ERROR: Call to undefined method plesk__client__domain__dns__toggle::_postRequestRequired() (DNSToggleUIPointer.php:26)
And as I said DNS appears when activated or deactivated by the domain from Plesk panel
Version: 11.5.30 #48
View 7 Replies
View Related
Nov 17, 2014
I noticed, that my Plesk install still runs an older Roundcube Installation (somewhere in the 0.9 range) and RoundCube 1.0.3 is currently the latest version available at [URL]
Is it safe to upgrade the Roundcube Installation in psa-roundcube manually from 0.9 to 1.0.x?
View 2 Replies
View Related