Unable to rebuild nginx configuration file: syntax error, unexpected 'endif' (T_ENDIF) file

Created:

2017-01-16 11:11:45 UTC

Modified:

2017-08-08 13:24:09 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to rebuild nginx configuration file: syntax error, unexpected 'endif' (T_ENDIF) file

Applicable to:

  • Plesk Onyx for Linux

Issue Symptoms

Unable to rebuild nginx configuration file in Plesk > Extensions > Webserver Configurations Troubleshooter > Rebuild :

Template processing failed: file = /usr/local/psa/admin/conf/templates/default/nginxDomainVhost.php, error = Template_Exception: syntax error, unexpected 'endif' (T_ENDIF) file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0 
Previous error: Template_Exception: syntax error, unexpected 'endif' (T_ENDIF) file: /usr/local/psa/admin/plib/Template/Processor.php line: 28 code: 0
Previous error: Template_Exception: syntax error, unexpected 'endif' (T_ENDIF) file: /usr/local/psa/admin/plib/Template/Processor.php line: 23 code: 0.

Checking web server configuration via Plesk > Extensions > Webserver Configurations Troubleshooter > Check Configuration resulted in warning:

Checking for custom configuration templates
Custom template /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php has been found
Custom template /usr/local/psa/admin/conf/templates/custom/server.php has been found
Some custom configuration templates have been found. The custom
templates have higher priority than default templates in case of
configs generation.
Please check documentation for details:
http://download1.parallels.com/Plesk/PP11/11.0/Doc/en-US/online/plesk-linux-advanced-administration-guide/68693.htm[WARNING]

Cause

Invalid custom nginx configuration templates.

Resolution

Move custom nginx configuration templates to another directory:

# mv /usr/local/psa/admin/conf/templates/custom/ ~/

Have more questions? Submit a request
Please sign in to leave a comment.