A website or Plesk site preview is inaccessible with any of the following errors:
500 external server error
503 Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration.
The following error message is shown on the Home page in Plesk:
Unable to generate the web server configuration file on the host example.com because of the following errors:
Template_Exception: AH00526: Syntax error on line 2 of /var/www/vhosts/system/example.com/conf/vhost.conf:
Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
Site code contains unsupported directives: PHP directives
php_value that are not supported in modern PHP versions. They were supported in PHP as Apache module only (mod_php Apache module) that is now deprecated as it is considered outdated and insecure.
- Login to Plesk
Go to Domains > example.com > File Manager and open
.htaccessfile for editing.
.htaccessfile may be located in domain subdirectories.
php_valuelines (put sign # at the beginning of the line) or remove completely
Click OK to apply the changes.
Open Domain > example.com > PHP Settings and add directives from step #3 in predefined parameters (like, post_max_size) or in the Additional configuration directives field. Example of an additional directives:
max_input_vars = 2000
Note: For PHP directives use php.ini syntax. Do not use