# Create a directory for the iipsrv binary
ScriptAlias /fcgi-bin/ "/usr/lib/iipimage-server/"

# Set the options on that directory
<Location "/fcgi-bin/">
   AllowOverride None
   Options None
   Require all granted

   # Set the module handler
   AddHandler fcgid-script .fcgi
</Location>

# Set our environment variables for the IIP server
FcgidInitialEnv VERBOSITY "1"
FcgidInitialEnv LOGFILE "/dev/stderr"
FcgidInitialEnv MAX_IMAGE_CACHE_SIZE "10"
FcgidInitialEnv JPEG_QUALITY "90"
FcgidInitialEnv MAX_CVT "5000"
FcgidInitialEnv MEMCACHED_SERVERS "localhost"
FcgidInitialEnv FILESYSTEM_PREFIX /var/www/data/project/web/sites/default/files/

# Define the idle timeout as unlimited and the number of
# processes we want
FcgidIdleTimeout 0
FcgidMaxProcessesPerClass 1