Some times website shows various characters instead of showing correct contents.
For solving this check the php version and check which version is compatible .
Then set the corresponding version via cpanel
i.e goto CPANEL >> php cofiguration >> enable php4 or 5
Wednesday, May 26, 2010
String replacement commands
Replace:
Syntax:
replace from to - filename
eg:cat test1
hai I am fine
replace hai hi -- test1
==================================
We can also use sed command for replacing the string
====================
Syntax:
sed 's/oldstring/newstring/g' filename
eg: sed 's/hai/hi/g' test1
Syntax:
replace from to - filename
eg:cat test1
hai I am fine
replace hai hi -- test1
==================================
We can also use sed command for replacing the string
====================
Syntax:
sed 's/oldstring/newstring/g' filename
eg: sed 's/hai/hi/g' test1
/etc/mailips
Mailips is mainly auto-generated file and is used for outgoing SMTP interface. However, you can also manually update and manage the mailips file. Full path to the mailips is: "/etc/mailips"
The syntax is:
* Add default sending IP address
*: IP
The above line will send outgoing mail from the default (eth0) IP address. Entry begins with an asterisk (*) will sets the default sending IP (from the eth0) address for domains without their own specific entry.
* Add specific entry for the domain.
domain.tld: IP1
sub.domain.tld: IP2
addondomain.tld: IP3
other.domain.tld: IP4
Each line defines a personal outgoing server for the domain. Doing it this way, each domain can have its own outgoing IP and that way, you will be able to setup RDNS (Reverse DNS) for each IP for that domain name.
The syntax is:
* Add default sending IP address
*: IP
The above line will send outgoing mail from the default (eth0) IP address. Entry begins with an asterisk (*) will sets the default sending IP (from the eth0) address for domains without their own specific entry.
* Add specific entry for the domain.
domain.tld: IP1
sub.domain.tld: IP2
addondomain.tld: IP3
other.domain.tld: IP4
Each line defines a personal outgoing server for the domain. Doing it this way, each domain can have its own outgoing IP and that way, you will be able to setup RDNS (Reverse DNS) for each IP for that domain name.
Monday, May 24, 2010
VIPoint important links
Configure lite speed:
=====
http://www.litespeedtech.com/docs/webserver/admin/
http://www.litespeedtech.com/docs/webserver/troubleshoot/
http://www.litespeedtech.com/docs/webserver/config/vhostlist/
http://www.litespeedtech.com/docs/webserver/config/vhostgeneral/
http://www.litespeedtech.com/docs/webserver/config/rewrite/
http://www.litespeedtech.com/support/wiki/doku.php
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:da&rev=1175563776
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:ezcpanel
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:cpanel
=====
Poornam forum:
http://bobcares.com/
Mod_rewrite
http://www.workingwith.me.uk/articles/scripting/mod_rewrite
Gallery:
http://codex.gallery2.org/Gallery2:FAQ
Outlook email error
http://www.computersplace.com/vista/outlook-email-error
RV site builder
http://www.rvsitebuilder.com/faqweb/index.php?action=show&cat=2
For downloading testfiles
http://www.thinkbroadband.com/download.html
phpmyadmin
http://www.icewalkers.com/Linux/Software/517580/phpMyAdmin.html
Centos
http://mirror.centos.org/centos/3.6/os/i386/RedHat/RPMS/
openvz
http://forum.openvz.org/index.php?t=msg&goto=25671&
Wordpress
http://techsemi.wordpress.com/
PLeask blog
http://rootatlinux.wordpress.com/plesk/
http://www.blogtoplist.com/rss/plesk.html
Direct admin
http://manageyourservers.blogspot.com/search?q=direct+admin
http://help.directadmin.com/
http://www.bigresource.com
=====
http://www.litespeedtech.com/docs/webserver/admin/
http://www.litespeedtech.com/docs/webserver/troubleshoot/
http://www.litespeedtech.com/docs/webserver/config/vhostlist/
http://www.litespeedtech.com/docs/webserver/config/vhostgeneral/
http://www.litespeedtech.com/docs/webserver/config/rewrite/
http://www.litespeedtech.com/support/wiki/doku.php
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:da&rev=1175563776
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:ezcpanel
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:cpanel
=====
Poornam forum:
http://bobcares.com/
Mod_rewrite
http://www.workingwith.me.uk/articles/scripting/mod_rewrite
Gallery:
http://codex.gallery2.org/Gallery2:FAQ
Outlook email error
http://www.computersplace.com/vista/outlook-email-error
RV site builder
http://www.rvsitebuilder.com/faqweb/index.php?action=show&cat=2
For downloading testfiles
http://www.thinkbroadband.com/download.html
phpmyadmin
http://www.icewalkers.com/Linux/Software/517580/phpMyAdmin.html
Centos
http://mirror.centos.org/centos/3.6/os/i386/RedHat/RPMS/
openvz
http://forum.openvz.org/index.php?t=msg&goto=25671&
Wordpress
http://techsemi.wordpress.com/
PLeask blog
http://rootatlinux.wordpress.com/plesk/
http://www.blogtoplist.com/rss/plesk.html
Direct admin
http://manageyourservers.blogspot.com/search?q=direct+admin
http://help.directadmin.com/
http://www.bigresource.com
How to configure NIS (Network Information Server) Server in Redhat Linux?
To configure NIS server you have to install ypserve and yp-tools rpms on the server, and ypbind and yp-tools rpms on the client. Follow the below steps to Configure the NIS server.
1) First You need to add the NIS domain you wish to use in the /etc/sysconfig/network file
#/etc/sysconfig/network
NISDOMAIN="MYDOMAIN"
2)NIS servers also have to be NIS clients themselves, so you'll have to edit the NIS client configuration file /etc/yp.conf to list the domain's NIS server as being the server itself or localhost.
Edit your yp.conf file
# /etc/yp.conf - ypbind configuration file
ypserver 127.0.0.1
3)Start the NIS server related Daemons.
service portmap start
service yppasswdd start
service ypserv start
Ensure that the above Daemons are part of the startup
chkconfig portmap on
chkconfig yppasswdd on
chkconfig ypserv on
Client Daemons are
ypbind
portmap
Then run the below command on the server to check the services running
rpcinfo -p localhost
5) Initialize your NIS Domain
Now that you have decided on the name of the NIS domain, you'll have to use the ypinit command to create the associated authentication files for the domain. You will be prompted for the name of the NIS server.
/usr/lib/yp/ypinit -m
You can now start the ypbind and the ypxfrd daemons because the NIS domain files have been created.
service ypbind start
service ypxfrd start
6)Adding NIS users
New NIS users can be created by logging into the NIS server and creating the new user account. In this case, you'll create a user account called nisuser and give it a new password.
Once this is complete, you then have to update the NIS domain's authentication files by executing the make command in the /var/yp directory.
This procedure makes all NIS-enabled, nonprivileged accounts become automatically accessible via NIS, not just newly created ones. It also exports all the user's characteristics stored in the /etc/passwd and /etc/group files, such as the login shell, the user's group, and home directory.
useradd -g users nisuser
passwd nisuser
cd /var/yp
make
You can check to see if the user's authentication information has been updated by using the ypmatch command, which should return the user's encrypted password string.
ypmatch nisuser passwd
7) Configuring NIS client.
The authconfig or the authconfig-tui program automatically configures your NIS files after prompting you for the IP address and domain of the NIS server.
Once finished, it should create an /etc/yp.conf file that defines, amongst other things, the IP address of the NIS server for a particular domain. It also edits the /etc/sysconfig/network file to define the NIS domain to which the NIS client belongs.
n addition, the authconfig program updates the /etc/nsswitch.conf file that lists the order in which certain data sources should be searched for name lookups, such as those in DNS, LDAP, and NIS. Here you can see where NIS entries were added for the important login files.
Start the ypbind NIS client, and portmap daemons in the /etc/init.d directory and use the chkconfig command to ensure they start after the next reboot. Remember to use the rpcinfo command to ensure they are running correctly.
8) Test NIS Access to NIS server.
You can run the ypcat, ypmatch, and getent commands to make sure communication to the server is correct.
Then try logging in via ssh or telnet and test NIS .
1) First You need to add the NIS domain you wish to use in the /etc/sysconfig/network file
#/etc/sysconfig/network
NISDOMAIN="MYDOMAIN"
2)NIS servers also have to be NIS clients themselves, so you'll have to edit the NIS client configuration file /etc/yp.conf to list the domain's NIS server as being the server itself or localhost.
Edit your yp.conf file
# /etc/yp.conf - ypbind configuration file
ypserver 127.0.0.1
3)Start the NIS server related Daemons.
service portmap start
service yppasswdd start
service ypserv start
Ensure that the above Daemons are part of the startup
chkconfig portmap on
chkconfig yppasswdd on
chkconfig ypserv on
Client Daemons are
ypbind
portmap
Then run the below command on the server to check the services running
rpcinfo -p localhost
5) Initialize your NIS Domain
Now that you have decided on the name of the NIS domain, you'll have to use the ypinit command to create the associated authentication files for the domain. You will be prompted for the name of the NIS server.
/usr/lib/yp/ypinit -m
You can now start the ypbind and the ypxfrd daemons because the NIS domain files have been created.
service ypbind start
service ypxfrd start
6)Adding NIS users
New NIS users can be created by logging into the NIS server and creating the new user account. In this case, you'll create a user account called nisuser and give it a new password.
Once this is complete, you then have to update the NIS domain's authentication files by executing the make command in the /var/yp directory.
This procedure makes all NIS-enabled, nonprivileged accounts become automatically accessible via NIS, not just newly created ones. It also exports all the user's characteristics stored in the /etc/passwd and /etc/group files, such as the login shell, the user's group, and home directory.
useradd -g users nisuser
passwd nisuser
cd /var/yp
make
You can check to see if the user's authentication information has been updated by using the ypmatch command, which should return the user's encrypted password string.
ypmatch nisuser passwd
7) Configuring NIS client.
The authconfig or the authconfig-tui program automatically configures your NIS files after prompting you for the IP address and domain of the NIS server.
Once finished, it should create an /etc/yp.conf file that defines, amongst other things, the IP address of the NIS server for a particular domain. It also edits the /etc/sysconfig/network file to define the NIS domain to which the NIS client belongs.
n addition, the authconfig program updates the /etc/nsswitch.conf file that lists the order in which certain data sources should be searched for name lookups, such as those in DNS, LDAP, and NIS. Here you can see where NIS entries were added for the important login files.
Start the ypbind NIS client, and portmap daemons in the /etc/init.d directory and use the chkconfig command to ensure they start after the next reboot. Remember to use the rpcinfo command to ensure they are running correctly.
8) Test NIS Access to NIS server.
You can run the ypcat, ypmatch, and getent commands to make sure communication to the server is correct.
Then try logging in via ssh or telnet and test NIS .
Block Darkmailer
If a server is infected with dark mailer then the solution for recovery is to install csf nad enable SMTP twaek i.e SMTP_ALLOWLOCAL = 1 and SMTP_BLOCK = "1"
scripts to block run php files in /home/spamd folder
#!/bin/bash
EXIT_PATH="/home/spamd"
CUR_DIR=`pwd`
echo $CUR_DIR $@|grep -q $EXIT_PATH
if [ "$?" -ne 0 ] ; then
/usr/local/bin/php.real $@
fi
EXIT_PATH="/home/spamd"
CUR_DIR=`pwd`
echo $CUR_DIR $@|grep -q $EXIT_PATH
if [ "$?" -ne 0 ] ; then
/usr/local/bin/php.real $@
fi
FXP support
Check /etc/pure-ftpd.conf
=====
grep FXP /etc/pure-ftpd.conf
# Allow FXP transfers for authenticated users.
AllowUserFXP no
# Allow anonymous FXP for anonymous and non-anonymous users.
AllowAnonymousFXP no
[root@host ~]#
======
=====
grep FXP /etc/pure-ftpd.conf
# Allow FXP transfers for authenticated users.
AllowUserFXP no
# Allow anonymous FXP for anonymous and non-anonymous users.
AllowAnonymousFXP no
[root@host ~]#
======
To check ssh access
[root@alphacentauri ~]# grep irugs /etc/passwd
irugs:x:646:647::/home/irugs:/bin/false
[root@alphacentauri ~]#
irugs:x:646:647::/home/irugs:/bin/false
[root@alphacentauri ~]#
Directory listing
.htaccess Tutorial - Directory Listing
When a web browser is pointed to a directory on your web site which does not have an index.html file in it, the files in that directory can be listed on a web page.
1. Enable/Disable Directory Listing
To have the web server produce a list of files for such directories, use the below line in your .htaccess.
Options +Indexes
To have an error (403) returned instead, use this line.
Options -Indexes
2. Listing Style
Either a basic list of files can be shown, or a 'fancy' list including icons, file size, modification date and more.
IndexOptions +FancyIndexing
Add this to your .htaccess file to use the 'fancy' style.
IndexOptions -FancyIndexing
Use the above line if you prefer a more basic file list.
3. Ignore Files
Let's say you have a directory with .jpg, .gif and .png image files. You only want the .png files to show in the directory listings. Add this line to your .htaccess.
IndexIgnore *.gif *.jpg
The web server now ignores the .gif and .jpg files.
4. Modify Index File
Maybe you don't want a list of the files, you want a specific file to be shown instead. You could upload an index.html file in this directory. There is another way.
DirectoryIndex myfile.html
Instead of listing the files, web page myfile.html will now be shown for this directory and its subdirectories.
When a web browser is pointed to a directory on your web site which does not have an index.html file in it, the files in that directory can be listed on a web page.
1. Enable/Disable Directory Listing
To have the web server produce a list of files for such directories, use the below line in your .htaccess.
Options +Indexes
To have an error (403) returned instead, use this line.
Options -Indexes
2. Listing Style
Either a basic list of files can be shown, or a 'fancy' list including icons, file size, modification date and more.
IndexOptions +FancyIndexing
Add this to your .htaccess file to use the 'fancy' style.
IndexOptions -FancyIndexing
Use the above line if you prefer a more basic file list.
3. Ignore Files
Let's say you have a directory with .jpg, .gif and .png image files. You only want the .png files to show in the directory listings. Add this line to your .htaccess.
IndexIgnore *.gif *.jpg
The web server now ignores the .gif and .jpg files.
4. Modify Index File
Maybe you don't want a list of the files, you want a specific file to be shown instead. You could upload an index.html file in this directory. There is another way.
DirectoryIndex myfile.html
Instead of listing the files, web page myfile.html will now be shown for this directory and its subdirectories.
Monday, May 17, 2010
Please configure it so that the server will send an email to ‘patrick@mobile9.com’ whenever someone logs into the server as root.
We can do it this in two ways
======
SSH:
echo 'SSH Root Access (Your Server Name) on:' `date` `who` | mail -s "ALERT: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" your@email-address.com
OR
WHM:
For tweaking this from WHM, the exact steps are:
Login to WHM > Scroll down the left menu to the bottom to reach the Plugins section > ConfigServer Security & Firewall > Firewall Configuration:
LF_SSH_EMAIL_ALERT: Send an email alert if anyone uses su to access another account. This will send an email alert whether the attempt to use su was successful or not.
LF_SU_EMAIL_ALERT: Send an email alert if anyone accesses WHM via root. An IP address will be reported again 1 hour after the last tracked access (or if lfd is restarted).
======
SSH:
echo 'SSH Root Access (Your Server Name) on:' `date` `who` | mail -s "ALERT: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" your@email-address.com
OR
WHM:
For tweaking this from WHM, the exact steps are:
Login to WHM > Scroll down the left menu to the bottom to reach the Plugins section > ConfigServer Security & Firewall > Firewall Configuration:
LF_SSH_EMAIL_ALERT: Send an email alert if anyone uses su to access another account. This will send an email alert whether the attempt to use su was successful or not.
LF_SU_EMAIL_ALERT: Send an email alert if anyone accesses WHM via root. An IP address will be reported again 1 hour after the last tracked access (or if lfd is restarted).
csf installation error
[root@server22 csf]# sh install.sh
Configuring for OS
Checking for perl modulesfailed
You need to install the LWP perl module (libwww-perl) and then install csf
[root@server22 csf]#
To fix the error, install libwww-perl
yum install perl-libwww-perl
Configuring for OS
Checking for perl modulesfailed
You need to install the LWP perl module (libwww-perl) and then install csf
[root@server22 csf]#
To fix the error, install libwww-perl
yum install perl-libwww-perl
Roundcube hangs when sending mail
Roundcube hangs when sending mail
In recent builds of roundcube, you may find that you can’t send mail using Roundcube. If /var/cpanel/roundcube/log/errors shows the following:
[30-Jan-2009 14:07:11] Invalid response code received from server (421):
[30-Jan-2009 14:07:11] Invalid response code received from server (-1):
[30-Jan-2009 14:07:34 -0800] SMTP Error: SMTP error: Authentication failure: STARTTLS failed (Code: ) in /usr/local/cpanel/base/3rdparty/roundcube/program/steps/mail/func.inc on line 1248 (POST /3rdparty/roundcube/index.php?_task=mail&_action=send)
[30-Jan-2009 14:10:29] STARTTLS failed ():
Then there is an issue with the most recent Net-SMTP PHP module. To resolve this, edit the following file:
vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php
and change
// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = ‘%u’;
to this:
// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = ”;
In recent builds of roundcube, you may find that you can’t send mail using Roundcube. If /var/cpanel/roundcube/log/errors shows the following:
[30-Jan-2009 14:07:11] Invalid response code received from server (421):
[30-Jan-2009 14:07:11] Invalid response code received from server (-1):
[30-Jan-2009 14:07:34 -0800] SMTP Error: SMTP error: Authentication failure: STARTTLS failed (Code: ) in /usr/local/cpanel/base/3rdparty/roundcube/program/steps/mail/func.inc on line 1248 (POST /3rdparty/roundcube/index.php?_task=mail&_action=send)
[30-Jan-2009 14:10:29] STARTTLS failed ():
Then there is an issue with the most recent Net-SMTP PHP module. To resolve this, edit the following file:
vi /usr/local/cpanel/base/3rdparty/roundcube/config/main.inc.php
and change
// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = ‘%u’;
to this:
// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = ”;
cant send attachement
Requested action aborted: error in processing
451 Error while writing spool file
===========
check df -h
and also check user quota
if /var is full the n we cant send attachements
451 Error while writing spool file
===========
check df -h
and also check user quota
if /var is full the n we cant send attachements
loacl IP poblem
Bringing up interface eth0: Error, some other host already uses address 192.168.1.11.
===========
vi /etc/sysconfig/network-scripts/ifcfg-eth0
change the IP
IPADDR=
==========
/etc/init.d/network restart
===========
vi /etc/sysconfig/network-scripts/ifcfg-eth0
change the IP
IPADDR=
==========
/etc/init.d/network restart
Add a group of Ips to csf
ip gropu 109.66.0.0 - 109.66.255.255
csf -a 109.66.0.0/16 will allow x.x.x.x i.w 109.66.0.0 to 255.255.255.255
csf -a 109.66.0.0/8 will allow 109.x.x.x
iptables
290 iptables -I INPUT -s 79.176.0.0/16 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart
csf -a 109.66.0.0/16 will allow x.x.x.x i.w 109.66.0.0 to 255.255.255.255
csf -a 109.66.0.0/8 will allow 109.x.x.x
iptables
290 iptables -I INPUT -s 79.176.0.0/16 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart
spf record and spf check
/usr/local/cpanel/bin/spf_installer uname
dig +trace TXT domainname
or
: Port25.com provides another tool to test whether your SPF record is working. Send an e-mail to check-auth@verifier.port25.com and you will receive a reply containing the results of the SPF check.
create an email acct with domain name and send an email to check-auth@verifier.port25.com and you will get an email back
=====
Also check the ip configured for spf in the zone file( In default spf is configured for public Ip)
dig +trace TXT domainname
or
: Port25.com provides another tool to test whether your SPF record is working. Send an e-mail to check-auth@verifier.port25.com and you will receive a reply containing the results of the SPF check.
create an email acct with domain name and send an email to check-auth@verifier.port25.com and you will get an email back
=====
Also check the ip configured for spf in the zone file( In default spf is configured for public Ip)
How upgrade plesk panel
1. go to control panel
2.Home >> Updates
3. We cant upgrade plesk directly to latest versin
only upgrade one by one i.e if we want to upgarde pleak from 9.2.1 to 9.5.1
then
a) first we want to uprade 9.2.1. to 9.2.2 then 9.2.3 and son
atlast upgarde to 9.5.1
2.Home >> Updates
3. We cant upgrade plesk directly to latest versin
only upgrade one by one i.e if we want to upgarde pleak from 9.2.1 to 9.5.1
then
a) first we want to uprade 9.2.1. to 9.2.2 then 9.2.3 and son
atlast upgarde to 9.5.1
plesk upgrade Db error in Plesk control panel
ERROR: PleskMainDBException
MySQL query failed: MySQL server has gone away
==================
Additionally, an exception has occurred while trying to report this error: PleskMainDBException
MySQL query failed: MySQL server has gone away
0: common_func.php3:168
db_query(string 'select `id`,`name`,`type`,`uri` from DashboardPreset where `id`=6')
1: class.Table.php:183
============
Solution:
comment the line wait_timeout in /etc/my.cnf
MySQL query failed: MySQL server has gone away
==================
Additionally, an exception has occurred while trying to report this error: PleskMainDBException
MySQL query failed: MySQL server has gone away
0: common_func.php3:168
db_query(string 'select `id`,`name`,`type`,`uri` from DashboardPreset where `id`=6')
1: class.Table.php:183
============
Solution:
comment the line wait_timeout in /etc/my.cnf
Add a new cpanel language
Unable to change language to Hungarian??
==========
1. Goto WHM>> Locale >> Locale XML Download
2. then convetr into correcsponding lang using google translator
3.then upload into cpanel using Locale XML Upload
==========
This will list the language in cpanel drop down list
==========
1. Goto WHM>> Locale >> Locale XML Download
2. then convetr into correcsponding lang using google translator
3.then upload into cpanel using Locale XML Upload
==========
This will list the language in cpanel drop down list
Subscribe to:
Posts (Atom)