Skip to content

Unable to access statistics if using subroot configuration on nginx

short description

When subroot (eg. ##subroot web##) is defined for a given site, nginx tries to resolve the path to the statistics folder in the subroot path instead of document root and this results in 404 errors on all resources in the stats folder.

I haven't tested if the Apache configuration displays the same behavior.

correct behaviour

Website configuration should be changed, so that content from the stats folder is accessible.

environment

Server OS: Ubuntu
Server OS version: 18.04.4
ISPConfig version: 3.1.15p3
nginx version: nginx/1.14.0 (Ubuntu)

proposed fix

None right now

log entries

2020/03/03 08:11:55 [error] 3335#3335: *181766 "/var/www/<website redacted>/web/web/stats/index.html" is not found (2: No such file or directory), client: <redacted>, server: <website redacted>, request: "GET /stats/ HTTP/2.0", host: "<website redacted>"
2020/03/03 08:16:19 [error] 3447#3447: *181834 open() "/var/www/<website redacted>/web/web/stats/awindex.html" failed (2: No such file or directory), client: <redacted>, server: <website redacted>, request: "GET /stats/awindex.html HTTP/2.0", host: "<website redacted>"
2020/03/06 08:07:23 [error] 29416#29416: *154016 open() "/var/www/<website redacted>/web/web/stats/index.php" failed (2: No such file or directory), client: <redacted>, server: <website redacted>, request: "GET /stats/index.php HTTP/2.0", host: "<website redacted>"
Edited by Jacob Rasmussen