BACKUPS=$(ls -al /home/*.gz |awk '{print $9}')
for i in $BACKUPS
do
echo "Restoring $i now...."
/scripts/restorepkg $i
done
Posted on 24 July 2010.
Posted in cpanel0 Comments
Posted on 25 June 2010.
Cpanel will always create apache configration and virtual host by its own template and every domian creation or susspenssion or termination or any thing else related to virtualhost configration of apache if being done will resultin cpanel to recreate apache virtualhost configration that will overwrite other custom modified settings.
so that the cpanel will recreat virtualhost from its template how to have custom virtualhost of some domains configrations?
there is an answer to that question that is to have modified configration on elsewhere and then include it in to that virtual host but there maybe a question came to your mind that as the Cpanel will recreate the virtualhost from its template so that the include will also become overwritten.
for this problem cpanle has created a ready made script that will verify your configration that should be inclueded that is
the step by step to how to do so is in the following
creating custom virtualhost configration step by step
1- create the commented include section directory such as this# Include “/usr/local/apache/conf/userdata/std/2/woshka/woshka.com/*.conf”
to create run
2-go to that directory
3-creat a config file than should be end by .conf
4-put your custom config in that config file config.conf
5-run this
or with jsut that user
/scripts/ensure_vhost_includes username
you are now finished
for confirmation that everything is fine go to that virtualhost and verify that the included section is uncommented with that custom config name
hope you enjoyed this training
have fun
voshka
Posted in Apache, cpanel0 Comments
Posted on 17 May 2010.
Cpanel has ready made scripts that will make your works so easier
such are pkgacct for backing up and restorepkg for restoring individual accounts through command in ssh
First you need to login to the ssh as root
Then use the following command to backup that spicific account:
Notice that the directory that you are in will be used to create backup of that account in there
To restore
Please notice that in order to restoreĀ you need to be on the directory where the backup is located
Posted in cpanel0 Comments
Posted on 10 May 2010.
For security resons not to allow php shells to be able to run on your server you must disable the shell_exec function in the php.ini using disable_functions
but when you do so on the time you want to autoinstall a cms with fantastico within your cpanel as a customer, you will be promted with so manny php errors that are caused because of disabling shell_exec
so how to have both the shell_exec disabled on the server and also be able to run fantastico delux?
there is an answer to that question
you must have a php sepreated for cpanel and have a seprated php.ini for cpanel php functions and php for your websites
in that way you can have both the php.ini containing shell_exec as a disabled function and also not to have any problem with fantastico as it is running on the cpalne with seprated php and php.ini that has shell_exec not disabled(it is enabled)
so to have your cpanel its own php, there is a predefiend scripts comming with cpanel that you can run to make the php jsut for cpanel
first run the following to update cpanel to latest version, making sure you have the lastest apckages available
then run the following to make seprated cpanel php:
please be pationt that it will take some times to complete according your server configration and setup.
so you are almost finisshed
the last step is to find out that you do not have shell_exec disabled in your cpanel php.ini
so check the following php.ini files
you are done
good luck
Posted in cpanel0 Comments
Posted on 15 March 2010.
about 13 month ago i was looking for a free Hosting manager to manage my accounts, and do the actions such as creating invoices, susspending, terminating accounts in automated mode.
I searched in google and I found “fhm-script.com” which was so cool but was in a bad shape and bad design but was so good for a small company
”
Free Hosting Manager V2.0 features a new client CP and a forced ads module!
Updated: 13th February 2009
”
there were also some other free and open-source hsoting manager as I remember such as coin
but lasly I had to buy a billing system rather than geting free open-source systems that may harm my server as they will grant access to the server to do the auotomation things.
so I encourage you to buy a license to use one of the paid version of billing systems.
voshka
Posted in cpanel0 Comments
Posted on 05 March 2010.
if you have WHM/Cpanel already installd as a WebHost manager then you will gain this great feture of secureing temp by just running a simple command
just run the following command:
result:
Posted in cpanel0 Comments
Posted on 21 February 2010.
type the folowing command into ssh
Posted in cpanel0 Comments
Posted on 05 February 2010.
It is so much important to have backup at least of a month ago
As no server is 100% secure and even your server may became hacked someday or maybe your server would crashed or even the hard may burned up without any speaking reasons, Having a backup will gelp you in these such situations.
After telling the importance of backup, lets say how to accomplish this in WHM/CPanel
If you want to create backups of the whole accounts go too the backup>configure backups
then set the backup to enable and then set the Date you want to have backup for exmaple daily.
Click on the days that you want the backup to be executed.
after that go to ssh and then run this command
or if you are in a case that want to create backup of individual accounts there is no need for those steps I provided earlier
just go to ssh and run this command
and the USERNAME is should be vary depends on the account you want to create backup for .
for more info about creating backup for individual accounts click the link bellow:
http://woshka.com/blog/cpanel/backup-and-restore-cpanel-accounts-with-command-line-usnig-ssh.html
Posted in cpanel0 Comments
Recent Comments