anchor.diff:      && bash /usr/local/vesta/upd/switch_rpath.sh \
   
   # docker specific patching
  -    && sed -i -e "s/if (\$dir_name/\/\/if (\$dir_name/g" /usr/local/vesta/web/list/rrd/image.php \
  +    && sed -i -e "s/^if (\$dir_name/\/\/if (\$dir_name/g" /usr/local/vesta/web/list/rrd/image.php \
   
   # increase open file limit for nginx and apache
       && echo "\n\n* soft nofile 800000\n* hard nofile 800000\n\n" >> /etc/security/limits.conf \
  
positive.code: FROM niiknow/docker-hostingbase:0.9.1
  
  MAINTAINER friends@niiknow.org
  
  ENV DEBIAN_FRONTEND=noninteractive \
      VESTA=/usr/local/vesta \
      GOLANG_VERSION=1.9 \
      DOTNET_DOWNLOAD_URL=https://download.microsoft.com/download/5/F/0/5F0362BD-7D0A-4A9D-9BF9-022C6B15B04D/dotnet-runtime-2.0.0-linux-x64.tar.gz  \
      NGINX_BUILD_DIR=/usr/src/nginx \
      NGINX_VERSION=1.13.5 \
      NGINX_PAGESPEED_VERSION=1.12.34.3 \
      NGINX_PSOL_VERSION=1.12.34.2 \
      IMAGE_FILTER_URL=https://raw.githubusercontent.com/niiknow/docker-nginx-image-proxy/master/build/src/ngx_http_image_filter_module.c
  
negative.code:     && mkdir -p ${NGINX_BUILD_DIR} \
  
      && cd ${NGINX_BUILD_DIR} \
      
  # get the source
      && apt-get source nginx=${NGINX_VERSION} -y \
      && mv ${NGINX_BUILD_DIR}/nginx-${NGINX_VERSION}/src/http/modules/ngx_http_image_filter_module.c ${NGINX_BUILD_DIR}/nginx-${NGINX_VERSION}/src/http/modules/ngx_http_image_filter_module.bak \
  
  # apply patch
      && curl -SL $IMAGE_FILTER_URL --output ${NGINX_BUILD_DIR}/nginx-${NGINX_VERSION}/src/http/modules/ngx_http_image_filter_module.c \
      && sed -i "s/--with-http_ssl_module/--with-http_ssl_module --with-http_image_filter_module --add-module=\/usr\/src\/nginx\/ngx_pagespeed-latest-stable/g" ${NGINX_BUILD_DIR}/nginx-${NGINX_VERSION}/debian/rules \
  
  # Load Pagespeed module, PSOL and nginx
      && curl -SL https://github.com/pagespeed/ngx_pagespeed/archive/latest-stable.zip  -o ${NGINX_BUILD_DIR}/latest-stable.zip \
  