setup a virtual ethernet device on linux
What would you do if you want to add one more IP to your system. Attach one more network device? No! Then what? You would setup a virtual ethernet device. Suppose you have a physical eth device named eth0 as below: eth0 Link encap:Ethernet HWaddr 00:1C:C0:78:31:E0 inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 ...
May 2nd, 2011 by Akhthar Parvez
/home/virtfs consuming a lot of space?
/home/virtfs is the directory created by cpanel to provide a restricted data access to jailshell users. When a user is logged in via jailshell, a virtual fileystem is created for the cpanel user by mounting only the selected filesystems under /home/virtfs/ so the user can (only) access the data under these filesystems. Since the data in /home/virtfs/ is pointed to the actual data, system would show...
May 2nd, 2011 by Akhthar Parvez
WordPress Category is created, but not with the slug entered
Sometimes, when you create a category in your WordPress application, it gets created but not with the desired slug. Slug is a term used to describe the short name of a category, tags alike – usually all lower case characters – that is used in the URL. Suppose, if you wanted to add a category with the slug “school”, the newly created category would have the slug “school-2″....
October 24th, 2010 by Akhthar Parvez
WordPress redirection is not working
If your wordpress is not displaying posts and categories alike eventhough the wordpress loads fine, it’s most likely that the redirection which is an integral part of WordPress is not working. You need to ensure the following things are setup: 1. Your webserver is built with rewrite module support. 2. You have the following lines in your .htaccess: <IfModule mod_rewrite.c> RewriteEngine...
October 24th, 2010 by Akhthar Parvez
How to check if your SMTP server is an open relay
If you’re setting up a Mail server, one of the most important tasks you need to do is ensure it’s not an open relay. Open relay means anyone can send out emails using the Mail Server without any authentication. If your SMTP server is an open relay, you are most likely to be blacklisted by all major spam lists. So, here’s how you can check whether your SMTP server is an open relay: telnet...
October 23rd, 2010 by Akhthar Parvez
Apache – Secure upload directories
It’s very important to secure directories which are being used as the destination dir for web uploads. You can do this by adding the following entries into the .htaccess file: Options -Indexes AddHandler cgi-script .php .php3 .php4 .php5 .phtml .pl .py .jsp .asp .htm .shtml .sh .cgi .txt Options -ExecCGI Just a small step to miss, but the impact may be huge. PS: Make sure that no directories...
August 6th, 2010 by Akhthar Parvez
Create an FTP user on a cPanel server from backend (shell)
Ever wondered how to create FTP users on a cPanel server? Adding FTP using pure-pw (for Pure-ftpd, who uses proftpd anyway?) won’t work because cPanel will overwrite it when you run /usr/local/cpanel/bin/ftpupdate. FYI, that command is being run everytime you add a new account on the server. Here’s the command to create an FTP user on a cPanel server: /usr/local/cpanel/bin/proftpd_passwd...
May 29th, 2010 by Akhthar Parvez
Redirect URL with htaccess
If you want to redirect a page/directory to another page/directory, it’s plain simple. Just add the following line into your .htaccess file. Redirect 301 /oldpage.html /new_directory/ Above rule will redirect all requests to the file /oldpage.html to the directory /new_directory/. Redirect number 301 means it was moved permanently. See all numbers below: 300 multiple choices (e.g. offer...
January 18th, 2010 by Akhthar Parvez
PHP error – URL file-access is disabled in the server configuration
If you get the following error while accessing a PHP script URL file-access is disabled in the server configuration Add the following into the .htaccess file for the particular website to get this work. php_flag allow_url_include Off Note: However, it’s highly recommended to keep allow_url_include disabled as it would be a security risk otherwise. This function allows remote files to be executed...
January 17th, 2010 by Akhthar Parvez
Install Mailparse
Mailparse is a PECL (PHP Extension Community Library) extension for parsing emails. You should have the PHP module mbstring for mailparse to work. It’s a pretty straightforward task. Run the following command to install mailparse: # pecl install mailparse If you get the following error whle compiling mailparse: checking whether the C compiler works… configure: error: cannot run C compiled...
December 31st, 2009 by Akhthar Parvez


