Website or site preview shows 500 Internal server error: Invalid command 'php_flag' or 'suPHP_ConfigPath'

Created:

2016-11-16 13:19:28 UTC

Modified:

2017-04-24 11:06:18 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Website or site preview shows 500 Internal server error: Invalid command 'php_flag' or 'suPHP_ConfigPath'

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

Symptoms

1. A website returns 500 - Internal server error . All others sites work fine.

From the domain logs, the following error appears:

# tail -f /var/www/vhosts/example.com/statistics/logs/error_log
/var/www/vhosts/example.com/httpdocs/.htaccess: RewriteRule: bad flag delimiters

2. Website preview returns 500 - Internal server error. The following error appears in /var/www/vhosts/system/example.com/logs/error_log:

[core:alert] [pid 19863:tid 140445831055104] [client 127.0.0.1:48654] /var/www/vhosts/example.com/public_html/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration

Or

[core:alert] [pid 19863:tid 140445831055104] [client 127.0.0.1:48654] /var/www/vhosts/example.com/public_html/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

The command 'suPHP_ConfigPath' refers to a non-existent directory:

# grep suPHP_ConfigPath /var/www/vhosts/aknsolutions.com/public_html/.htaccess
suPHP_ConfigPath /home/aksol5/public_html
# ll /home/aksol5/public_html
ls: cannot access '/home/aksol5/public_html': No such file or directory

Cause

According to the error is with the file /var/www/vhosts/example.com/httpdocs/.htaccess .

.htaccess files provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.

PHP directives are not supproted by .htaccess file if PHP is not running as an Apache module.

Resolution

Rename the .htaccess file to /var/www/vhosts/example.com/httpdocs/.htaccess_backup and check the access to website and domain logs once again.

If it didn't help check the article [HUB] 500 - Internal Server Error

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