Disable directory browsing using .htaccess in apache

Apache web server allow directory browsing by default. It’s always good to disable directory browsing in security aspect. To disable directory browsing in apache web server you need to edit the httpd.conf or .htaccess Disable directory browsing using .htaccess:- Open your .htacces file Look for Options …

Install eAccelerator to Optimize PHP performance

Server load increase? looking for ways to optimize your php performance? if you have php optimization problem, you should try PHP eAccelerator. PHP eAccelerator is a free open source PHP accelerator, optimizer and dynamic content cache module that specially build to optimize php performance. According to …

Add Primary and Secondary DNS server – /etc/resolve.conf

Below is the steps to add domain name server (DNS) in your machine using /etc/resolve.conf file:- Open file /etc/resolve.conf You should see something like this:- search localhost.localdomain Add your Primary and Secondary Domain Name server (DNS) ip at the end of the file and it should …

Setup static IP in Debian

To setup static IP in Debian is a bit difficult as it has no TUI for networking setup. So to setup static IP in Debian, you need to modify file manually. To setup static IP in Debian follow the steps below:- First, we need to modify …

Redirect non www to www using .htaccess

Copy and append the code below to your .htaccess: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www.domain.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 Save your .htaccess file and try to enter domain.com at your browser and it should be redirect you to www.domain.com automatically now. Related posts: How to protect …

Setup SSH without password

If you find enter password for ssh is irritating, then you may setup ssh without password. With public key authentication, you can ssh without password and it will auto login to the server once you key in the ssh command. The authentication is done via the …

Setup syslog server in UBuntu

To setup syslog server in UBuntu Linux, follow the steps below:- First you need to make sure you are login as root, then stop the syslog service /etc/init.d/sysklogd stop Open /etc/sysconfig/syslog with your favourite editor and look for the line below: SYSLOGD=”-u syslog” and edit the …

Setup mysqldump without password in cronjob

To setup mysqldump without password in Cronjob, follow the steps below:- Start your terminal and login to your server Create a .my.cnf file in the home directory vi ~/.my.cnf Copy the content below and replace with your mysql username and password. user = mysqluser password = …

Install flash player in Ubuntu

To install flash player in Ubuntu, follow the steps below:- Start your Terminal Now enter the command below: sudo apt-get remove flashplugin-* –purge   This command is to remove all the previous version of flash player (it might be old flash player that doesn’t work anymore) …

WordPress visual editor not showing fix

To fix WordPress visual editor not showing, follow the steps below:- FTP to your web server Download your wp-config.php and add this line of code at the bottom of the file before the “require_once” line. define(‘CONCATENATE_SCRIPTS’, false );   (*remember to backup the original wp-config.php) Once …

Block .log file using in .htaccess

To block .log file using .htaccess, follow the steps below:- Go to your document root directory (normally it’s the folder name is ‘public_html’, ‘www’, ‘htdocs’ folder) Create a new .htaccess file (if you already have a .htaccess file, just edit it) Append the code below to …