Statistics error

Discussion in 'General' started by Korsch, Oct 8, 2023.

  1. Korsch

    Korsch New Member

    im currently running a Xenforo on my install, I have it set up to use friendly URL's within the forum and on ISPConfig options tab im using
    Code:
    location / {
        try_files $uri $uri/ /index.php?$uri&$args;
        index index.php index.html;
    }
    
    location /install/data/ {
        internal;
    }
    location /install/templates/ {
        internal;
    }
    location /internal_data/ {
        internal;
    }
    location /library/ { #legacy
        internal;
    }
    location /src/ {
        internal;
    }
    
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
    as nginx directive's. the forum is installed and running on the main directory.
    Ive noticed since adding these directives I can no longer view my statistics for that site, clicking the stats button returns a 500 internal server error. Im guessing it's from the custom directives im using but before I make further changes to this section I wanna make sure that it makes the most sense with everyone.
     
  2. remkoh

    remkoh Active Member HowtoForge Supporter

    Have a look in the logs to see what's causing the 500 error.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Another issue with the above config is that the PHP in that website runs as the wrong user because you use the wrong socket file location here:
    Code:
    fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    This makes PHP run as www-data and not the web user of the site. Better use the {FASTCGIPASS} placeholder instead.
     
    ahrasis likes this.

Share This Page