I – Cài đặt Nginx:
Bổ sung các Remi repository bằng cách cài đặt gói rpm sau
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Sử dụng lệnh yum để cài đặt Nginx và PHP FPM từ Remi repo
# yum --enablerepo=remi install nginx php php-fpm php-common
Đảm bảo đầy đủ các gói như hình đưới đây…
mod_spamhaus is an Apache module for DNS Block Listing that protects web services by denying access to particular IP addresses. It can stop spam relaying via web form URL injection, and block HTTP DDoS attacks from bot-nets.
It queries sbl-xbl.spamhaus.org, taking advantage of the Spamhaus Block List (SBL) and the Exploits Block List (XBL).
1. Download the latest mod_spamhaus deb package from sid package repository (mod_spamhaus is not available for lenny but we can use the sid package)
wget http://ftp.us.debian.org/debian/pool/main/m/mod-spamhaus/libapache2-mod-spamhaus_0.7-1_i386.deb
This package is for i386. If you are using other architecture, you can find a suitable package on the bottom of this page: http://packages.debian.org/sid/libapache2-mod-spamhaus
2. Install the package
dpkg -i libapache2-mod-spamhaus_0.7-1_i386.deb
Apache is automatically restarted and the module is enabled. If you would like to test the module you can add a line to your hosts file to make it think that your IP address is blocked (pico /etc/hosts)
127.0.0.4 1.0.168.192.sbl-xbl.spamhaus.org
Replace 1.0.168.192 with your IP address and reverse it. The IP address 192.168.0.1 should read 1.0.168.192.
By default, only POST, PUT, OPTIONS, CONNECT methods are blocked. You can add GET to the list of methods blocked in /etc/apache2/mods-enabled/mod-spamhaus.conf to block the spammers from seeing your website.
apache2-mpm-itk is an MPM (Multi-Processing Module) for the Apache web server. mpm-itk allows you to run each of your vhost under a separate uid and gid — in short, the scripts and configuration files for one vhost no longer have to be readable for all the other vhosts.
1. Install the apache2-mpm-itk package
apt-get install apache2-mpm-itk
2. Configure user and group for each virtual host by adding the following line somewhere between <VirtualHost *:80>...</VirtualHost>
AssignUserId [user] [group]
Replace [user] and [group] with a username and group name that already exists on the system.
3. Change the owner of the web root
chown [user].[group] [location]
Replace [user] and [group] with the username and group name configured on the virtual host. Replace [location] with the location specified as DocumentRoot for the virtual host, eg. /var/www
4. Make sure the location isn't accessible by other users (optional)
chmod o= [location]
Replace [location] with the location specified as DocumentRoot for the virtual host, eg. /var/www
5. Restart apache
/etc/init.d/apache restart