First 7.1 build with nginx complie

This commit is contained in:
Ric Harvey
2017-02-05 22:46:45 +00:00
parent cab88604a6
commit c445176457
4 changed files with 157 additions and 51 deletions

View File

@@ -67,31 +67,31 @@ fi
# Display PHP error's or not
if [[ "$ERRORS" != "1" ]] ; then
echo php_flag[display_errors] = off >> /etc/php7/php-fpm.conf
echo php_flag[display_errors] = off >> /usr/local/etc/php-fpm.conf
else
echo php_flag[display_errors] = on >> /etc/php7/php-fpm.conf
echo php_flag[display_errors] = on >> /usr/local/etc/php-fpm.conf
fi
# Display Version Details or not
if [[ "$HIDE_NGINX_HEADERS" == "0" ]] ; then
sed -i "s/server_tokens off;/server_tokens on;/g" /etc/nginx/nginx.conf
else
sed -i "s/expose_php = On/expose_php = Off/g" /etc/php7/conf.d/php.ini
sed -i "s/expose_php = On/expose_php = Off/g" /usr/local/etc/php-fpm.conf
fi
# Increase the memory_limit
if [ ! -z "$PHP_MEM_LIMIT" ]; then
sed -i "s/memory_limit = 128M/memory_limit = ${PHP_MEM_LIMIT}M/g" /etc/php7/conf.d/php.ini
sed -i "s/memory_limit = 128M/memory_limit = ${PHP_MEM_LIMIT}M/g" /usr/local/etc/php-fpm.conf
fi
# Increase the post_max_size
if [ ! -z "$PHP_POST_MAX_SIZE" ]; then
sed -i "s/post_max_size = 100M/post_max_size = ${PHP_POST_MAX_SIZE}M/g" /etc/php7/conf.d/php.ini
sed -i "s/post_max_size = 100M/post_max_size = ${PHP_POST_MAX_SIZE}M/g" /usr/local/etc/php-fpm.conf
fi
# Increase the upload_max_filesize
if [ ! -z "$PHP_UPLOAD_MAX_FILESIZE" ]; then
sed -i "s/upload_max_filesize = 100M/upload_max_filesize= ${PHP_UPLOAD_MAX_FILESIZE}M/g" /etc/php7/conf.d/php.ini
sed -i "s/upload_max_filesize = 100M/upload_max_filesize= ${PHP_UPLOAD_MAX_FILESIZE}M/g" /usr/local/etc/php-fpm.conf
fi
# Always chown webroot for better mounting