nginx watermark , наложение водных знаков в nginx

Posted in Новости on 29 января, 2016 by admin

1. Обновляем систему до упора.

apt-get update
apt-get upgrade
apt-get install dpkg-dev

2. Качаем исходники nginx

cd /usr/src
apt-get source nginx

3. Качаем модуль imagefilter для nginx

wget https://github.com/intaro/nginx-image-filter-watermark/archive/master.zip
unzip master.zip
cp nginx-image-filter-watermark-master/ngx_http_image_filter_module.c nginx-*/src/http/modules/ngx_http_image_filter_module.c

4. Включаем в сборку флаг :

--with-http_image_filter_module

5. Собираем пакет, не забывая сделать вместо «make install» — «checkinstall»
6. Включаем в нужный блок :

location /img/ {
image_filter watermark;
image_filter_watermark "PATH_TO_FILE";
image_filter_watermark_position center-center; or other position
}

Tags: , ,