Browse Source

Fix for Nginx white screen of death, fixes #538

servicefixes
gau1991 10 years ago
parent
commit
50673867d4
  1. 8
      ee/cli/plugins/site_functions.py
  2. 11
      ee/cli/plugins/stack.py

8
ee/cli/plugins/site_functions.py

@ -566,6 +566,14 @@ def site_package_check(self, stype):
if not EEAptGet.is_installed(self, check_nginx):
apt_packages = apt_packages + EEVariables.ee_nginx
else:
# Fix for Nginx white screen death
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;')
if stype in ['php', 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
Log.debug(self, "Setting apt_packages variable for PHP")

11
ee/cli/plugins/stack.py

@ -361,6 +361,17 @@ class EEStackController(CementBaseController):
out=ee_nginx)
ee_nginx.close()
# Fix whitescreen of death beacuse of missing value
# fastcgi_param SCRIPT_FILENAME $request_filename; in file
# /etc/nginx/fastcgi_params
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;')
# Pagespeed configuration
Log.debug(self, 'Writting the Pagespeed Global '
'configuration to file /etc/nginx/conf.d/'

Loading…
Cancel
Save