Plesk

“View the phpinfo() page” button in Plesk does not work: Error: Unable to retrieve information about the PHP configuration

Symptoms

Cause

Restrictive Apache rewrite rules are blocking access to the domain's phpinfo() page. For example:

#<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} "!(^|/).well-known/([^./]+./?)+$" [NC]
RewriteCond %{SCRIPT_FILENAME} -d [OR]
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)." - [F]
</IfModule>
<IfModule mod_authz_core.c>
<FilesMatch "(^#.*#|.(bak|conf|dist|fla|in[ci]|log|orig|psd|sh|sql|sw[op])|~)$">
Require all denied
</FilesMatch>
</IfModule>

Resolution

Disable restrictive rewrite rules

If directives are set in Plesk

1. Log in to Plesk

2. Navigate to Domains > example.com > Apache & nginx Settings > Additional Apache Directives section

3. Remove restrictive rules from Additional Apache directives for HTTP/HTTPS fields

if directives are set in the .htaccess file

1. Connect to the server via SSH

2. Open the domain's .htaccess file via any text editor (for example, vim):

# vi /var/www/vhosts/example.com/httpdocs/.htaccess

3. Remove restrictive rules

Exit mobile version