Server requirements

Minimum server requirements

  • Unix-like OS (Windows is not supported)
  • PHP 5.3, 5.4, 5.5, 5.6 without suhosin
  • IonCube Loader 4.6.1 or above
  • Mysql 5.0 or above and its support in PHP
  • FFmpeg 1.0 or above with libx264, libavfilter and AAC codec (libfaac, libfdk_aac or native ffmpeg aac codec)
  • ImageMagick
  • cURL and its support in PHP
  • Apache + mod_rewrite + (MultiViews option disabled)
  • Non-cyrillic domain name

Minimum PHP requirements

  • Zlib library
  • XML extension
  • GD2 with true type font (required!)
  • Ability to exec PHP from CLI using exec() command
  • Multibyte String (mbstring)
  • PHP register_globals off
  • PHP magic_quotes_gpc off
  • PHP safe_mode off
  • PHP file_uploads on
  • PHP allow_url_fopen on

Recommended configuration (very desired)

  • Memcache and its support in PHP
  • Nginx (configured with options: --with-http_flv_module --with-http_mp4_module) + Apache (via reverse proxy)
  • Using eAccelerator or XCache is NOT recommended

Nginx usage

We recommend using Nginx as a reverse proxy over Apache. First, Nginx performs much better than Apache. Second, you will not be able to configure pseudo-streaming using Apache. And finally, KVS is integrated with Nginx to protect your content from hotlinking and auto-grabbing.

Nginx sample config contains options to protect local video storage directories:

  • location ~ /contents/videos/.*\.mp4
  • location ~ /contents/videos/.*\.flv
  • location ^~ /contents/videos_sources/

The client_max_body_size value should be specified according to your requirements depending on the maximum amount of video files you will upload from the local disk or expect your users to upload.

If you are going to allow embed codes for your videos, you should make sure that Nginx does not intercept requests to swf files.

Recommended PHP options

  • PHP upload_max_filesize 2000M (the maximum allowed size for uploaded files)
  • PHP post_max_size 2000M (the maximum allowed size for uploaded files)
  • PHP memory_limit 128M
  • PHP session.gc_maxlifetime 21600

Requirements for multiserver scenario

All the requirements above are related to the simplest configuration, which only utilizes 1 single physical server. KVS supports separate physical servers for content storage or CPU-hungry conversion operations. If you are going to use separate servers, they will have different requirements:

  • Content server: PHP, Nginx recommended
  • Conversion server: PHP, FFmpeg, ImageMagick