When you are browsing a website, you can check the type of web server running by retrieving the response server header. For example the following server response return for website http://www.debian-tutorials.com:

HTTP/1.1 200 OK
Server: Apache/2.2.22
Date: Mon, 04 Mar 2013 00:43:59 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/5.2.17
X-Pingback: http://www.debian-tutorials.com/xmlrpc.php
Cache-Control: max-age=7200
Expires: Mon, 04 Mar 2013 02:43:58 GMT
Vary: Accept-Encoding

From the information we can know that the web server is running on Apache version 2.2.22.

By using NginX you can personalize and customize your server header to the name that you want. Instead of showing the real web server name which is “nginx”  you can set for users to see the web server name as “my websites webserver“.

In this guide I will show you how to  customize server header using NginX headers-more module without compiling again the server.

1. Install Nginx webserver if you don’t have it installed already.

You can use this guide to do it: Setting up Nginx plus PHP FastCGI on Debian 6.0.6 Squeeze

2.Install nginx-extras package.

In Debian Squeeze exists one package called nginx-extras that contains some standard modules, plus extra features and modules like headers-more-module and others. You can find more info here: http://packages.debian.org/sid/nginx-extras

Install the nginx-extras packages like this:

apt-get install nginx-extras

3. Make some changes under  http directive to NginX configuration file which located under /etc/nginx/nginx.conf as below: Continue Reading…

Lighttpd is an open-source web server more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible.

In this tutorial I will show you how yo install Lighttpd on Debian with PHP-FPM and MySQL support.

Step1. Install MySQL

apt-get install mysql-server mysql-client libmysqlclient16

Make sure that you provide a strong password for the MySQL root user.

Step2. Install Lighttpd on Debian

apt-get install lighttpd

You can access now this page http://localhost/index.lighttpd.html from your browser and you should see the Lighttpd default page


Continue Reading…

Cherokee is a high performance WebServer and is released under GNU license. Cherokee webserver is developed in C language and is available for all major distributions. Compared with all other webservers, Cherokee is having a major feature. It offers graphical admin interface for managing all tasks.

In this article I will show you how to install Cherokee on Debian with MySQL and PHP5 support.

Step1. First we need to install MySQL.
Install MySQL Server and Client using the following command:

root@cherokee:/# apt-get install mysql-server mysql-client

and follow onscreen instructions.

Step2. Install PHP5 and add FastCGI support. This is needed by Cherokee webserver.

root@cherokee:/# apt-get install php5 php5-cgi php5-mysql php5-gd php5-curl php-pear php5-imagick php5-memcache php5-xmlrpc php5-xsl

Now open /etc/php5/cgi/php.ini file and uncomment the cgi.fix_pathinfo=1 line.

Step3. Installing Cherokee Web Server in Debian: Continue Reading…

This article is about setting up Nginx + PHP-FastCGI on Debian 6.0.6 Squeeze

Step1. Install nginx and php5-cgi :

apt-get install nginx php5-cgi

Step2. Replace Nginx default virtualhosts config with the following content:

server {
listen [::]:80;
server_name debian-tutorials.com;
root /var/www/debian-tutorials.com;
index index.html index.htm index.php;
access_log /var/log/debian-tutorials.com.access.log;

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/tmp/php.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;

NOTE: Replace debian-tutorials.com with your own domain.

Step3. Create a  Debian init script to control the php-cgi daemon.

Continue Reading…

Most of Linux distributions comes with Linux Auditing Technique that makes it feasible to track file changes.

It’s a useful functionality for sysadmins who need to know who and when  changed sensitive files like /etc/passwd, /etc/sudoers or PHP files.

In the following tutorial I will show you how to track changes on your PHP files:

1. Fist step is creating a MD5 file that corresponding with your PHP files from your website. (for example from /var/www/debian-tutorials.com)

We will find all php file from /var/www/debian-tutorials.com and we wll create a MD5 for every file and save that md5 file in /root

find /var/www/debian-tutorials.com  -name “*.php”  | xargs md5sum > /root/md5-debian-tutorials

The file will look like this: Continue Reading…