Browse Source

added hotfix for whitescreen of death for NGINX PLUS users

MiteshShah-patch-1
harshadyeola 9 years ago
parent
commit
bdf8ead688
  1. 9
      ee/cli/plugins/stack.py
  2. 4
      install

9
ee/cli/plugins/stack.py

@ -224,6 +224,15 @@ class EEStackController(CementBaseController):
EEService.reload_service(self, 'postfix') EEService.reload_service(self, 'postfix')
if set(EEVariables.ee_nginx).issubset(set(apt_packages)): if set(EEVariables.ee_nginx).issubset(set(apt_packages)):
if set(["nginx-plus"]).issubset(set(apt_packages)):
# Fix for white screen death with NGINX PLUS
if not EEFileUtils.grep(self, '/etc/nginx/fastcgi_params',
'SCRIPT_FILENAME'):
with open('/etc/nginx/fastcgi_params', encoding='utf-8',
mode='a') as ee_nginx:
ee_nginx.write('fastcgi_param \tSCRIPT_FILENAME '
'\t$request_filename;\n')
if not (os.path.isfile('/etc/nginx/common/wpfc.conf')): if not (os.path.isfile('/etc/nginx/common/wpfc.conf')):
# Change EasyEngine Version in nginx.conf file # Change EasyEngine Version in nginx.conf file
EEFileUtils.searchreplace(self, "/etc/nginx/nginx.conf", EEFileUtils.searchreplace(self, "/etc/nginx/nginx.conf",

4
install

@ -383,6 +383,10 @@ function ee_update_latest()
sed -i "s/.*X-Powered-By.*/\tadd_header X-Powered-By \"EasyEngine $ee_version_new\";/" /etc/nginx/nginx.conf &>> /dev/null sed -i "s/.*X-Powered-By.*/\tadd_header X-Powered-By \"EasyEngine $ee_version_new\";/" /etc/nginx/nginx.conf &>> /dev/null
fi fi
if [ -f /etc/nginx/conf.d/ee-plus.conf ]; then
sed -i "s/.*X-Powered-By.*/\tadd_header X-Powered-By \"EasyEngine $ee_version_new\";/" /etc/nginx/conf.d/ee-plus.conf &>> /dev/null
fi
# Disable Xdebug on old systems if and only if ee debug is off # Disable Xdebug on old systems if and only if ee debug is off
if [ -f /etc/php5/mods-available/xdebug.ini ]; then if [ -f /etc/php5/mods-available/xdebug.ini ]; then
ee_debug_value=$(grep -Hr 9001 /etc/nginx/conf.d/upstream.conf | wc -l ) ee_debug_value=$(grep -Hr 9001 /etc/nginx/conf.d/upstream.conf | wc -l )

Loading…
Cancel
Save