Skip to content

Requirements

Before installing Pressify, ensure that your server meets the following requirements:

System Requirements

  • Nginx, Apache, or another compatible web server
  • PHP 8.2 or higher
  • MySQL 5.x or 8.x database server
  • Redis or Dragonfly for caching
  • Memcached for caching

Required PHP Extensions

  • PDO
  • OpenSSL
  • Mbstring
  • Exif
  • Fileinfo
  • XML
  • Ctype
  • JSON
  • Tokenizer
  • cURL
  • Zip
  • Iconv

Note: If you are using Apache, ensure that the mod_rewrite module is enabled.

Additional Services (Required for Media File Management)

For image optimization in Pressify, install the following tools:

  • ffmpeg: Extract video posters and create animated WebP files
  • imagemagick: Convert and optimize images
  • gifsicle: Optimize GIF files

Automatic Image Resize/Crop Configuration (Nginx)

For automatic image resizing and cropping via URL, install the nginx-mod-http-image-filter module for Nginx.

Here are practical examples:

nginx
location /thumb {
    alias /var/www/html/public/resize;
    set $width 0;
    set $height 0;
    set $dimens "";
    if ($uri ~* "^/thumb_x(\d*)x(\d*)/(.*)" ) {
        set $width $1;
        set $height $2;
        set $image_path $3;
        set $demins "_$1x$2";
        set $image_uri image_resize/$image_path?width=$width&height=$height;
    }
    if ($uri ~* "^/thumb_xx(\d*)/(.*)" ) {
        set $width 10000;
        set $height $1;
        set $image_path $2;
        set $demins "_xx$1";
        set $image_uri image_resize/$image_path?width=$width&height=$height;
    }
    if ($uri ~* "^/thumb_x(\d*)x/(.*)" ) {
        set $width $1;
        set $height 10000;
        set $image_path $2;
        set $demins "_$1xx";
        set $image_uri image_rs/$image_path?width=$width&height=$height;
    }
    if (!-f $request_filename) {
        proxy_pass http://127.0.0.1/$image_uri;
        break;
    }
    proxy_store /var/cache/nginx/pressify/resize$demins/$image_path;
    proxy_store_access user:rw group:rw all:r;
    proxy_set_header Host $host;
    allow all;
}

location /image_resize {
    alias /var/www/html/public/;
    image_filter crop $arg_width $arg_height;
    image_filter_buffer 5M;
    image_filter_jpeg_quality 95;
    allow all;
}

location /image_rs {
    alias /var/www/html/public/;
    image_filter resize $arg_width $arg_height;
    image_filter_buffer 10M;
    image_filter_jpeg_quality 100;
    allow all;
    expires 2d;
    add_header Cache-Control public;
}

Access thumbnails via URLs such as /thumb_x300x200/image.jpg for cropping or /thumb_xx200/image.jpg for resizing.

Released under the MIT License.