MySql Database Replication

When we search for `Database Replication` we will find lots of tutorials, so here I wont add new one, I am just highlighting one of the best tutorials to refer. http://www.howtoforge.com/mysql_database_replication This article contains simple copy & paste steps to configure MySql replication, if you need more detailed indepth explanation on different configuration settings then go to http://dev.mysql.com/doc/refman/5.0/en/replication.html

Page level caching using nginx

Many of our dynamic sites contain rarely updated content (ex. blog archive page). By adding nginx server as proxy server infront of your apache server you can server those pages like static pages instead of running the page for every request, this will boost your site speed from 50% - 400%. We need apache, nginx to work with this tutorial To install nginx on debian please follow this link http://timothybowler.com/2009/11/25/compiling-nginx-on-debian-lenny/ Note: Dont install using aptitude it contains older version where gzip and proxy module not available, Modify apache ports.conf to run apache on port 8080 Add this lines to default site of nginx [shell]

server { listen 80; server_name debianzone.com; location / { proxy_pass http://debianzone.com:8080; proxy_cache debianzone-cache; proxy_cache_valid 200 302 60m; proxy_cache_valid 404 1m; } } [/shell] Add this in http section of nginx.conf[shell] http { proxy_cache_path /var/www/cache levels=1:2 keys_zone=debianzone-cache:8m max_size=1000m inactive=600m; proxy_temp_path /var/www/cache/tmp; }

[/shell]

Debian / Ubuntu Apache SSL Configuration

Hey you are planning to start a e-commerce website, then you must know about SSL without which no one will trust your website as a safe place to use their cards… What is SSL? SSL (Secure Socket Layer) is a protocol used for secure data transfer. This is done by using private keys and certificates. A private key is used to encrypt the data which you are sending and the server can only decrypt this data with the private key available with it, A certificate is used to authentic yourself before proceeding. So we need two things to make our website secure for online transactions. In this article i will explain how to generate a private key, certificate request with open-ssl and apache, get certificate from CA (Certificate Authority), configure your server to respond for ssl requests. Different types of certificates Before going to configuration I will explain about the different types of certificates available in the market and when to use which. The certificates are mainly divided into High Assurance and Low Assurance, High assurance is needed for sites dealing with financial transactions, low assurance is needed for internal corporate networks or small websites and mainly used for secure login to site and sending sensitive documents securely. Remember every byte you are sending through http protocol means non-ssl layer can be seen or accessed by anyone. Configuration: I used Apache 2, Debian Linux, Openssl for this configuration. First step is to install Apache: Go to console mode

Read the rest of this post »