Archive for May, 2010

What is the difference between Domain disk space and Hard disk quota?

Domain disk space - a calculation of everything the domain uses disk space for i.e. web, mail, databases, etc.
Hard disk quota - a calculation of disk space used by a domains ftp user account i.e. web files.

Domain disk space
This is how much disk space is used by the entire domain. It is made up of Plesk statistics and includes the amount of disk space taken by web pages, mail accounts, databases and other domain data including options specified in the statistic settings on Server -> Server preferences page in the Plesk CP.

Hard disk quota
Is a file system feature that limits how much disk space can be taken by the files which are owned by a specific system account (either domain FTP user or webuser or subdomain FTP user).

This file system quota cannot be exceeded. If the limit is reached, the system user will not be able to create new files and will receive the error “no more space left on device”.

Reference : http://parallels.com

How to determine system log settings for a Linux server?

Usually the /var/log/messages file is used for the regular system messages.

It is possible to find which place is used by a Linux system for logging from the /etc/syslog.conf or /etc/rsyslog.conf configuration files:

#cat /etc/syslog.conf

or

#cat /etc/rsyslog.conf

How to check if Perl script engine is enabled and working for a domain?

To check this we can use a simple script like this:

#!/usr/bin/perl
print “content-type:text/html\n\n”;
print “<html>\n”;
print “<head />\n”;
print “<body>\n”;
print “Hello World!\n”;
print “</body>\n”;
print “</html>\n”;
#

Save the content into a text file and save in the domain web-accessible folder (like $HTTPD_VHOSTS_D/domain.tld/httpdocs) on the server with .pl extension (test.pl for example). Then try to open the file via browser by the http://domain.tld/test.pl URL. The domain name should be resolved for this to work.

The test looks successful if a page shows the “Hello World!” string.

If an error or full script listing is visible, it means that Perl script engine is not configured for the domain properly.

1. Create a file with the following content:

<?php
phpinfo();
?>

and then save it into the $HTTPD_VHOSTS_D/domain.tld/httpdocs folder as 1.php (the name may be different, only .php should be existed)

2. Open the file via browser:

http://your-domain.com/1.php

Note! The PHP support should be enabled for the domain.

On the page the standard PHP diagnostic table should be existed.

Debugging on part(s) of the bash script

Using the set Bash built-in you can run in normal mode those portions of the script of which you are sure they are without fault, and display debugging information only for troublesome zones. Say we are not sure what the w command will do in the example commented-script1.sh, then we could enclose it in the script like this.

set -x # activate debugging from here
w
set +x # stop debugging from here

You can switch debugging mode on and off as many times as you want within the same script.

« Prev - Next »