Piwik is a  source, open (GPL) web real-time analysis software. It provides detailed reports about visitors on your website like: search engines,  keywords used, the language they speak, your popular pages .
Piwik is an alternative to Google Analytics, and is already used by more than 150,000 websites.
Piwik is an PHP MySQL software program that you can download and install on your own web server. At the end of installation process you will be given five minutes JavaScript code.
Simply copy and paste this tag on websites that wish to track  and access your reports real-time analysis.

You can Download the latest Piwik release and install it on your server. You will need at least PHP5.1 and MySQL to make piwik to work.

Install Piwik on Debian Squeeze:

Step1.  First we need to download the latest release of Piwik from http://piwik.org/latest.zip :

wget http://piwik.org/latest.zip

Step2. Then unzip the downloaded file. This will  create a “piwik” folder containing files and directories.

unzip latest.zip

Continue Reading…

How to purge Varnish cache

Valic —  August 10, 2011 — 3 Comments

If you’re new varnish user, this is some words about varnish:

Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. Unlike other HTTP accelerators, such as squid, which began as a cache on the client, or Apache2, which is mainly an origin server, Varnish was designed from the ground up as an HTTP accelerator..

Now I will show you how to purge all the cache without restarting the daemon.
The following coomand will do this for you:

varnishadm -T 127.0.0.1:6082 url.purge .*

Enjoy

1. Configure The Master
First we have to edit /etc/mysql/my.cnf

We have to enable networking for MySQL, and MySQL should listen on all IP addresses, therefore we comment out these lines (if existant):

#skip-networking
#bind-address            = 127.0.0.1

Furthermorewe have to tell MySQL for which database it should write logs,which log file it should use, and we have to specify that this MySQLserver is the master. We want to replicate the database exampledb, so we put the following lines into /etc/mysql/my.cnf:

log-bin = /var/log/mysql/mysql-bin.log

# what database you want to replication

binlog-do-db=exampledb

server-id=1

Then we restart MySQL:

/etc/init.d/mysql restart

Then we log into the MySQL database as root and create a user with replication privileges:

mysql -u root -p
Enter password:

GRANT REPLICATION SLAVE ON *.* TO ‘slave_user’@’%’ IDENTIFIED BY ‘<your_password>’;
FLUSH PRIVILEGES;

Next do this:

USE exampledb; FLUSH TABLES WITH READ LOCK; SHOW MASTER STATUS;

Now leave the MySQL shell:

Continue Reading…

You may be concerned about the security of your servers, and you should know that hackers often try to break your server

One way to secure your LAMP server would stop Apache and PHP5 to send details of their versions or other valuable informations.

1. How to hide Apache2 version?

Continue Reading…

Nginx Canonical Domain

Valic —  July 19, 2011 — Leave a comment
############# www to non-www
server{
  listen 80;
  server_name  www.debian-tutorials.com;
  rewrite ^(.*) http://debian-tutorials.com$1 permanent;
}

############# non-www to www
server {
  if ($host ~* ^([a-z0-9\-]+\.(com|net|org))$) {
    set $host_with_www www.$1;
    rewrite ^(.*)$ http://$host_with_www$1 permanent;
  }
}

Enjoy
Page 4 of 9123456789