WEB HOSTING UK CPANEL WEB HOSTING
MANAGED DEDICATED SERVERS WINDOWS WEB HOSTING
WINDOWS ASP.NET MSSQL ECOMMERCE HOSTING
VIRTUAL PRIVATE SERVERS PHP MYSQL LINUX HOSTING
MS SQL MS ACCESS ASP .NET WHM CPANEL RESELLER HOST
LINUX WINDOWS WEB HOSTING ECOMMERCE SHOPPING CART
OSCOMMERCE AGORA ZEN CART BUSINESS WEB SITE HOSTING
PERSONAL WEB SITE HOSTING DOMAIN NAME REGISTRATION

cPanel Issues


Hello,

If you are getting following error  with wordpress while uploading images.

The uploaded file could not be moved to  /home/username/public_html/wordpress/wp-content/uploads

then please make sure that

safe_mode_gid=ON  (in php.ini)

and check the permission of upload directory it should be 777 , if it is something different then change it to 777 with following command

chmod 777 wp-content/uploads
and issue will get resolved.

728x90-server  ICON for Fantastico is not appearing in cPanel

If Fantastico is installed on your Linux dedicated server but you are not getting the Icon of Fantastico under cPanel. In such case verify the following settings:

-please make sure that the Fantastico is enabled in your WHM’s Feature Sets as well as enabled in the WHM Fantastico admin

- Please make sure that their is a symlink to the Fantastico directory in every theme you use x or x3

ln -s /usr/local/cpanel/3rdparty/fantastico /usr/local/cpanel/base/frontend/x3

- Please verify the version of wget on your server and update it accordingly  wget-1.10.2-3.2.1 

For 32-bit:
Code:
rpm -qa wget ;
wget ftp://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/wget-1.10.2-3.2.1.i386.rpm
chattr -ia /usr/bin/wget
rpm -e wget ;
rpm -ivh --force wget-1.10.2-3.2.1.i386.rpm ;
rpm -qa wget ;

For 64-bit:
Code:
rpm -qa wget ;
wget http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/x86_64/os/Fedora/wget-1.10.2-15.fc7.x86_64.rpm ;
chattr -ia /usr/bin/wget
rpm -e wget ;
rpm -ivh --force wget-1.10.2-15.fc7.x86_64.rpm ;
rpm -qa wget ;
once wget version get updated, Please install fantastico once again .

[Fri Oct 10 00:11:01 2008] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten — Unclean shutdown of previous Apache run?
semget: No space left on device

This error occurred because there is no more space left in Semaphore Arrays for Apache.

You can check semaphore arrays on your server using the following command .

# ipcs -s

If you see too many of them, run the script as given below

#for i in `ipcs -s | awk ‘{print $2}’`; do ipcrm -s $i;done

Now restart Apache services

# service httpd startssl

Now Fixed….

Web Hosting

With cpanel Linux Dedicated Server we are getting following error

error : [notice] child pid x exit signal File size limit exceeded (25.)

This error occurs due to log file limit exceeded on server. On linux 32 Bit server apache support maximum filesize upto 2GB. If any log file exceeded this limit then you will get above error and apache services het hanged
TO get it resolved you need to log files with following directories
/usr/local/apache/logs and /var/log/

To get it resolved you need to emptied your log files those are above 2GB

Web Hosting

How to access Awstats from outside the control panel ?

Accessing Awstats from outside the control panel is easy.

Step 1.

Download awstats from awstats.sourceforge.net

Step 2.

Uncompress awstats-5.6.tgz

Step 3.

Copy the contents of the uncompressed cgi-bin folder from your hard drive to the user cgi-bin directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories).

Step 4.

If necessary (should not be needed with most setups), edit the first (top-most) line of awstats.pl file that is

#!/usr/bin/perl

to reflect the path were your Perl interpreter is installed. Default value works for most of Unix OS, but it also might be #!/usr/local/bin/perl

Step 5.

Move AWStats icon sub-directories and its content into a directory readable by your web server, for example /home/users/public_html/icons

Step 6.

Copy awstats.model.conf file into a new file named awstats.myvirtualhostname.conf.

This new file must be stored in /home/user/public_html/cgi-bin.

Step 7.

Edit this new config file with your own setup :

- Change LogFile value with full path of your web server log file (The path is: LogFile=”/usr/local/apache/domlogs/domain.com”).
- Check if LogFormat has the value “1″ (it means “NCSA apache combined/ELF/XLF log format”).
- Change DirIcons parameter to reflect relative path of icon directory. (DirIcons=”/icons”)
- Edit SiteDomain parameter with the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mydomain.com).

IMPORTANT!
- Change DirData to use the same Statics file than Cpanel Awstats and do not loose any entry.
(DirData=”/home/user/tmp/awstats/”)

Step 8.

Access AwStats by the URL:
www.domain.com/cgi-bin/awstats.pl?config=domain.com

Done!!!

The AwStats will refresh the Statics every 24 Hours.

Is it possible to allow users to update Awstats from the Cpanel?

Yes, Change the parameter “AllowToUpdateStatsFromBrowser” in /usr/local/cpanel/etc/awstats.conf set to 1,

AWStats add a button on report page to “update” statistics from a web browser. This is not a good idea, because Update process can be long so you might experience “time out” browser errors if you don’t launch AWStats enough frequently. Also, it take around 12-24 hours to take into effect.

There is an option in WHM>> Server Configuration >> Tweak Settings>>Stats and Logs to “Allow users to update Awstats from cPanel“.

How to update Awstats and webalizer via shell?

We could update the webalizer using the command /usr/local/cpanel/3rdparty/bin/english/webalizer -N 10 -D /home/username/tmp/webalizer/dns_cache.db -R 250 -p -n domain.com -o /home/username/tmp/webalizer /usr/local/apache/domlogs/domain.com

The Awstats can be updated by using the script /scripts/runweblogs accountname

Is it possible to view webalizer stats without login to cpanel?

Yes. Do the following steps.

cd /home/username/www
ln -s ../tmp/webalizer stats
chown username.username stats
cd ../tmp
chmod 755 ./
chmod 755 ./webalizer
—————-
will allow domain.com/stats/ for viewing stats without logging in to cpanel

Following steps will allow only selected users in particular group to run GET command on the server :

Step 1:- Create a group on the server

Code:

]# groupadd getgrp

Step 2:- Give execute permission to group

Code:

]# chmod 750 /usr/bin/GET

Step 3:- Add this group to GET file.

Code:

]# chown root.getgrp /usr/bin/GET

Step 4:- To check the permission of GET

Code:

]# ll -ld /usr/bin/GET

Step 5:- Now if you need to add the user to getgrp so that he gets execute permission on GET. Also getgrp should be secondary group of that user. Let the user be myuser1.

Code:

]# gpasswd -M myuser1 getgrp

Step 6:- To check if the user is added

Code:

]# cat /etc/group | grep getgrp

Step 7:- But if you want to add another user say myuser2 then please make sure that you mention both the user in your command as :

Code:

]# gpasswd -M myuser1,myuser2 getgrp

If you don’t mention both the user, this command will replace all the users with the user mentioned in your command. You should always run the cat command before adding any user so that you know how many users are already added. Or you can just edit the /etc/group file and add the user in the getgrp line.

The above steps will allow only root, myuser1 and myuser2 to execute GET command, all other will be denied.

Please note that path to GET may vary with the OS.

How can I run Rootkit Hunter every day?

You can create a cronjob script like this:

=========== /etc/cron.daily/rkhunter ====================
#!/bin/sh
(
/usr/local/bin/rkhunter –versioncheck
/usr/local/bin/rkhunter –update
/usr/local/bin/rkhunter –cronjob –report-warnings-only
) | /bin/mail -s ‘rkhunter Daily Run’ root
================================================== =======

You must be at ver 1.2.8 to use the report warnings only funtion.

How do I install Rootkit Hunter?

Download the gzipped tarball, extract it and run the installation script.

download:
# wget http://downloads.rootkit.nl/rkhunter-1.2.8.tar.gz
Note: It doesn’t matter where you save the tarball

extract:
# tar zxf rkhunter-1.2.8.tar.gz

installation:
# cd rkhunter
# ./installer.sh

This tutorial is for Web Server Administrators who administer Web Server.

Rules for Apache 2.x for better Security !

P.S: you must have Apache 2.x and Modsecurity_2 Installed

Step 1:- Downloading the Rules file

Code:

cd /etc
wget http://hyperois.com/files/modsec2_rules.tar.gz

Step 2:- Uncompress files

Code:

tar -xzvf modsec2_rules.tar.gz

Step 3:- Edit modsec2.conf

Code:

vi /usr/local/apache/conf/modsec2.conf

Step 4:- Copy and Paste this rules into your modsec2.conf

Code:

<IfModule mod_security2.c>
SecRuleEngine On
# “Add the rules that will do exactly the same as the directives”
# SecFilterCheckURLEncoding On

# SecFilterForceByteRange 0 255
SecAuditEngine RelevantOnly
SecAuditLog logs/modsec_audit.log
SecDebugLog logs/modsec_debug_log
SecDebugLogLevel 0
SecDefaultAction “phase:2,deny,log,status:406″

SecRule REMOTE_ADDR “^127.0.0.1$” nolog,allow
Include “/usr/local/apache/conf/modsec2.user.conf”

SecServerSignature “Rules Powered By HyperOIS.com”

#First, add in your exclusion rules:
#These MUST come first!
Include /etc/modsecurity/exclude.conf

#Application protection rules
Include /etc/modsecurity/rules.conf

#Just in Time Patches for Vulnerable Applications
Include /etc/modsecurity/jitp.conf

#Comment spam rules
Include /etc/modsecurity/blacklist.conf

#Bad hosts, bad proxies and other bad players
Include /etc/modsecurity/blacklist2.conf

#Bad clients, known bogus useragents and other signs of malware
Include /etc/modsecurity/useragents.conf

#Known bad software, rootkits and other malware
Include /etc/modsecurity/rootkits.conf

#Additional rules for Apache 2.x ONLY! Do not add this line if you use Apache 1.x
Include /etc/modsecurity/apache2-rules.conf

</IfModule>

Step 5:- Save and exit the file by clicking escape then typing

Code:

:wq

Step 6:- Lets apply the new setting by restarting Apache

Code:

services httpd restart

or

Code:

/etc/init.d/httpd restart

AWStats is a free powerful and featureful tool that generates advanced web, streaming, ftp or mail server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages.

The Setup consists of 5 major steps:

1. Installing Perl
2. The AWStats Setup
3. Setup IIS Logging
4. Setup AWStats Config File
5. Scheduling Log File Analysis

1. Installing Perl

Download the Perl binary for Windows.
Grab the MSI version.
Go ahead and run the install.
It will automatically create the Web Service Extension mapping in IIS.
However you need to allow that from IIS manager.

2. The AWStats Setup

Now that Perl is installed, we can get AWStats all setup.

1. Run the Setup. Select all the defaults.
2. Copy the contents of its Bin directory to C:\Perl\Bin Folder.
3. Go into IIS Manager, create the virtual directory named stats under default Website for C:\Perl\Bin.
4. Give Execute Permissions, select Scripts and Executables from the dropdown.

3. Setup IIS Logging

1. Right click the website to be logged, go to properties, and then on the Configuration tab, check off
2. Enable Logging (if it isn’t already).
3. Select W3C Extended Format from the dropdown, and then click Properties.
4. Proceed to the advanced tab and uncheck everything. There are certain items here that we’ll tick back off.

Namely, the following items should be checked:

Date (date)
Time (time)
Client IP Address (c-ip)
Username (cs-username)
Method (cs-method)
URI Stem (cs-uri-stem)
Protocol Status (sc-status)
Bytes Sent (sc-bytes)
Protocol Version (cs-version)
User Agent (cs(User-Agent))
Referrer (cs(Referrer))

The IIS end is now done, the final step is to setup the AWStats.conf file.

4. Setup AWStats Config file

It is already copied in the C:\Perl\Bin Folder directory. Copy the existing config file and save it as awstats.mywebsite.com.conf.

*yourdomain.com = name of the website you want to monitor.

The first parameter to setup is your log file item. The only important part is the final piece at the end with the date time codes.

Here’s the line from my config file below:

LogFile=”C:\WINDOWS\system32\LogFiles\W3SVC1\ex%YY-0%MM-0%DD-0.log”

The config file and documentation say that one should specify LogFormat=2 for IIS. Unfortunately, IIS 6 does not follow this predefined format, so we’ll have to specify our own:

LogFormat=”date time cs-method cs-uri-stem cs-username c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-bytes”

Then we have to specify the value of Site Domain. Site Domain must contain the main domain name, or the main intranet web server name, used to reach the web site.

SiteDomain=”www.yourdomain.com”

5. Scheduling Log file Analysis

AWStats only analyzes log files when told to do so. It can easily be toggled from the command line, and running a scheduled task to do this is the best solution.

Here’s a command that look like:

c:\perl\bin\perl.exe awstats.pl -config=yourdomain.com –update

All set now, you can access the stats from http://yourdomain.com/stats

Next Page »