Applicable to:
- Plesk 12.5 for Linux
- Plesk Onyx for Linux
- Plesk 11.x for Linux
- Plesk 12.0 for Linux
Symptoms
-
Unable to access domain's web statistics page at
https://www.example.com/plesk-stat/webstat/
: it gets redirected to domain main page, or shows error:CONFIG_TEXT: 404 not found
-
The following nginx directive is defined under Plesk > Domains > example.com > Apache and nginx Settings :
CONFIG_TEXT: if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
}or:
CONFIG_TEXT: if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
} -
PHP handler is set to FPM by Nginx under Plesk > Domains > example.com > PHP settings.
Cause
Additional nginx directives interfere with accessing Web Statistics
Resolution
-
Go to Domains > example.com > Apache & nginx Settings
-
Replace the additional directive with the following:
CONFIG_TEXT: if (!-e $request_filename ){
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon)){
set $test "${test}C";
}
if ($test = PC){
rewrite ^ /server/index.php last;
} -
If the directive above fixes the issue with Web Statistics page, but makes some links on a site broken, use the following additional directives instead:
CONFIG_TEXT: if (!-e $request_filename ){
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon)){
set $test "${test}C";
}
if ($test = PC){
rewrite ^/(.*)$ /index.php?q=$1 last;
}
If additional directives are not required for website functioning, remove them under Plesk > Domains > example.com > Apache and nginx Settings .
Comments
0 comments
Please sign in to leave a comment.