Installing mod_wsgi
For the installation of mod_wsgi first you need to install mysql-python
"yum install python26-devel"
By using the easyapache script you can install this module on your cpanel servers. Basically if you run easyapache script this module is not on the list. To make list this module on your easyapache script you need execute the following command
wget http://easyapache.cpanel.net/optmods/$NAME.tar.gz
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf $NAME.tar.gz
Here it is
tar -C /var/cpanel/easy/apache/custom_opt_mods -xzf ModWSGI.tar.gz
You can find all the custom module on http://docs.cpanel.net/twiki/bin/view/EasyApache3/CustomMods
Once you do this then mod_wsgi will be list on your easyapache script
Tuesday, February 15, 2011
Friday, February 4, 2011
redirection
Using .htaccess we can do the redirection
Regular Expression:-
. (full stop) - match any character
* (asterix) - match zero or more of the previous symbol
+ (plus) - match one or more of the previous symbol
? (question) - match zero or one of the previous symbol
\? (backslash-something) - match special characters
^ (caret) - match the start of a string
$ (dollar) - match the end of a string
redirect abc.com to abc.com/blog/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^abc.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.abc.com$
RewriteRule ^/?$ "http\:\/\/www\.abc\.com\/blog" [R=301,L]
redirecting abc.com/def.com to xyz.com[ie primarydomain.com/addondomain.com to anotherdomain/any]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^abc\.com\/def\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.abc.com\/def\.com$ [OR]
RewriteRule ^/?$ "http\:\/\/www\.xyz\.com\/404.php" [R=301,L]
Redirecting parked domain to another website
RewriteEngine on
RewriteCond %{HTTP_HOST} ^parkedomain.com$
RewriteRule ^(.*)$ http://anydomain.com/$1 [R=301]
OR
RewriteCond %{HTTP_HOST} ^parkeddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.parkeddomain.com$
RewriteRule ^/?$ "http\:\/\/www\.otherdomain\.com" [R=301,L]
Regular Expression:-
. (full stop) - match any character
* (asterix) - match zero or more of the previous symbol
+ (plus) - match one or more of the previous symbol
? (question) - match zero or one of the previous symbol
\? (backslash-something) - match special characters
^ (caret) - match the start of a string
$ (dollar) - match the end of a string
redirect abc.com to abc.com/blog/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^abc.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.abc.com$
RewriteRule ^/?$ "http\:\/\/www\.abc\.com\/blog" [R=301,L]
redirecting abc.com/def.com to xyz.com[ie primarydomain.com/addondomain.com to anotherdomain/any]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^abc\.com\/def\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.abc.com\/def\.com$ [OR]
RewriteRule ^/?$ "http\:\/\/www\.xyz\.com\/404.php" [R=301,L]
Redirecting parked domain to another website
RewriteEngine on
RewriteCond %{HTTP_HOST} ^parkedomain.com$
RewriteRule ^(.*)$ http://anydomain.com/$1 [R=301]
OR
RewriteCond %{HTTP_HOST} ^parkeddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.parkeddomain.com$
RewriteRule ^/?$ "http\:\/\/www\.otherdomain\.com" [R=301,L]
Friday, January 28, 2011
customize cpanel
If you want to customize your cpanel Sometimes it is very safe to restrict limited icons to your client cpanel to avoid some messes.
If you have a WHM account you can make a feature list and which can be add to your package. Here i am explaining how to enable a feature list and which is added to the particular domain.
1. Login to your WHM.
2. Click on Feature Manager menu
3. Type a new feature list name and hit the Add button.
4. Select which all are the icons you want, and deselect which icons you don't want.
5. Hit the Save button
6. After that click Edit Package menu
7. Select the package name which your particular domain is using, and then click Edit button.
8. Go to the bottom where you can see Feature List and a drop down option.
8. Select the new feature list name(which you have made on step 3) and click the Save Changes button.
Thanks,
If you have a WHM account you can make a feature list and which can be add to your package. Here i am explaining how to enable a feature list and which is added to the particular domain.
1. Login to your WHM.
2. Click on Feature Manager menu
3. Type a new feature list name and hit the Add button.
4. Select which all are the icons you want, and deselect which icons you don't want.
5. Hit the Save button
6. After that click Edit Package menu
7. Select the package name which your particular domain is using, and then click Edit button.
8. Go to the bottom where you can see Feature List and a drop down option.
8. Select the new feature list name(which you have made on step 3) and click the Save Changes button.
Thanks,
Thursday, January 27, 2011
Virus in Windows
There is one type of virus that we are all seen in windows machine is Folders inside the folder. Some time these folders we can not delete because of the invalid file name. In Windows based machine we can not make any files with invalid words. But viruses can make this folders on your windows machine :)
Once we have these issue, we will use antivirus such as Nod32 and AVG etc ...These antivirus packages can delete these invalid files.
But without installing these Antivirus we can delete these folders using DOS commands
For deleting
rd /S "\\?\c:\path to your folder/file name"
here we use "rd" command instead of using "del" command.
Once we have these issue, we will use antivirus such as Nod32 and AVG etc ...These antivirus packages can delete these invalid files.
But without installing these Antivirus we can delete these folders using DOS commands
For deleting
rd /S "\\?\c:\path to your folder/file name"
here we use "rd" command instead of using "del" command.
Friday, January 21, 2011
wget for windows
wget Command
Most us know "wget" is a command which is monopoly to unix based OS. We can use wget command now in wondows based systems also. Using wget you can download and retrieve files softwares using the protocol such as http and ftp. Why iam introducing this if any one don't know about this, use at least one genuine software on your windows machine :-) . wget is a free open software which you can use your own property.
Windows users can get more information here :
http://gnuwin32.sourceforge.net/packages/wget.htm
After installing this software you can retrieve files on your DOS prompt
usage : wget download path
wget http://download.admod.net/ezeelogin_4.9.34_debug.bin
Most us know "wget" is a command which is monopoly to unix based OS. We can use wget command now in wondows based systems also. Using wget you can download and retrieve files softwares using the protocol such as http and ftp. Why iam introducing this if any one don't know about this, use at least one genuine software on your windows machine :-) . wget is a free open software which you can use your own property.
Windows users can get more information here :
http://gnuwin32.sourceforge.net/packages/wget.htm
After installing this software you can retrieve files on your DOS prompt
usage : wget download path
wget http://download.admod.net/ezeelogin_4.9.34_debug.bin
Saturday, January 1, 2011
myisam_sort_buffer_size
Database error: Invalid SQL: select * from members where email='
ajeeshbkannan@gmail.com' and password='ajeeshbkanan'
*MySQL Error*:144 Table './table name' is marked as crashed
and last (automatic?) repair failed
This is may due to myisam_sort_buffer_size is too small. I have increased mysql buffer size from 64Mb to 256Mb, and fixed my issue.
You can verify table by using the command,
mysql> check table tablename;
All your comments are welcomed ...
ajeeshbkannan@gmail.com' and password='ajeeshbkanan'
*MySQL Error*:144 Table './table name' is marked as crashed
and last (automatic?) repair failed
This is may due to myisam_sort_buffer_size is too small. I have increased mysql buffer size from 64Mb to 256Mb, and fixed my issue.
You can verify table by using the command,
mysql> check table tablename;
All your comments are welcomed ...
Friday, December 24, 2010
TUN TAP DEVICE/ OPENVPN
Enabling TUN DEVICE/ OPENVPN on your server (on Virtual Private Server).
For enabling TUN Device or Open VPN you need to access your hardware node. If you have the Hardware access please do the following steps.
[root@ajeesh ~]# modprobe tun
[root@ajeesh ~]# veid=99999[enter your VEID no]
[root@ajeesh ~]# /usr/sbin/vzctl set $veid --devices c:10:200:rw --save
Setting devices
Saved parameters for VE 99999
[root@ajeesh ~]# /usr/sbin/vzctl exec $veid mkdir -p /dev/net
[root@ajeesh ~]# /usr/sbin/vzctl exec $veid mknod /dev/net/tun c 10 200
mknod: `/dev/net/tun': File exists
[root@ajeesh ~]# /usr/sbin/vzctl exec $veid chmod 600 /dev/net/tun
Thanks you comments are valuable to me ....
For enabling TUN Device or Open VPN you need to access your hardware node. If you have the Hardware access please do the following steps.
[root@ajeesh ~]# modprobe tun
[root@ajeesh ~]# veid=99999[enter your VEID no]
[root@ajeesh ~]# /usr/sbin/vzctl set $veid --devices c:10:200:rw --save
Setting devices
Saved parameters for VE 99999
[root@ajeesh ~]# /usr/sbin/vzctl exec $veid mkdir -p /dev/net
[root@ajeesh ~]# /usr/sbin/vzctl exec $veid mknod /dev/net/tun c 10 200
mknod: `/dev/net/tun': File exists
[root@ajeesh ~]# /usr/sbin/vzctl exec $veid chmod 600 /dev/net/tun
Thanks you comments are valuable to me ....
Subscribe to:
Posts (Atom)