Step1. Install Apache2 using the command:

apt-get install apache2-mpm-worker

Now you cand navigate from  your browser to http://your-ip to check if Apache2 is working (you should see the Apache2 default page with message:  It works).

Step2.  Install PHP5-FPM.

We will make PHP5 work in Apache2 through PHP-FPM and Apache2  mod_fastcgi module.
We need to install apache mod-fastcgi first:

apt-get install libapache2-mod-fastcgi php5

Now install php-fpm:

echo “deb http://packages.dotdeb.org stable all” >> /etc/apt/sources.list
echo “deb-src http://packages.dotdeb.org stable all” >> /etc/apt/sources.list
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg |apt-key add -
apt-get update
apt-get install php5-fpm

Step3. Enable the  Apache2 modules: Continue Reading…

APC  Configuration:

Once you have installed following this tutorial http://www.debian-tutorials.com/general/installing-apc-alternative-php-cache-into-php5-on-debian  you need to configure it.

APC makes use of a shared memory segment to cache php scripts. This enables multiple processes to access the cache. You can configure how massive that segment is in megabytes:

apc.shm_size=100M

By default,  APC will cache every php file requested by visitors to your website. On a typical server you will have lots of thousands of source files. So in the event you monitor the output of apc.php you will find that with time even 100MB of memory is not sufficient for APC. It will keep running  out of space as it tries to cache all the files.
To deal with this, APC will swap out old files from the cache according to this setting which specifies the time to live in seconds of files that have not been accessed recently:

apc.ttl=1300

You may prefer to cache only some of the files such as those used by the most popular websites on the server. To do that you must first set this option:

Continue Reading…

APC is a free and  open PHP5 opcode cacher for caching & optimizing PHP5 intermediate code.
It is similar to other PHP5 opcode cachers, such as eAccelerator & XCache.

1. Install APC on Debian:

APC is a PHP5 extension and we will install it using PECL.For that we need to install APC dependencies:

apt-get install php5-dev apache2-prefork-dev build-essential

Now install APC:

pecl install apc

2. Enable APC:

After install you need to enable APC. Add the following line in php.ini file:

Continue Reading…

1. Install Apache 2.4 from source:

1.1 Prerequisites:

For installing Apache2.4 on Debian you need APR library. You can install this using the following command:

apt-get install libaprutil1 libaprutil1-dev

1.2  Download Apache2.4:

Download the latest version from here: http://httpd.apache.org/download.cgi#apache24
Go to /usr/src directory and download the latest version.

cd /usr/src
wget http://lnx.apollo-hw.ro/apache//httpd/httpd-2.4.1.tar.gz

1.3. Extract and Install Apache2.4:

Continue Reading…

Suhosin can be disabled by 2 methods:

1. Disable Suhosin using php.ini:

Open the php.ini file and add the following code:

[suhosin]
suhosin.simulation = On

NOTE: On means disabled and  Off means enabled.

Now restart the Apache2 server and Suhosin will be disabled.

/etc/init.d/apache2 restart

2. Disable Suhosin for specific domain using  .htaccess file: Continue Reading…

Page 2 of 9123456789