Stats 404

Discussion in 'Installation/Configuration' started by Joseph811, May 12, 2020.

  1. Joseph811

    Joseph811 New Member

    I just did a fresh ispconfig installation only with nginx, mariadb, pure-ftpd and minimal postfix to be able php mail() function use. In the installer I chose the expert mode, and skip mail server.

    So, the issue is that the stats are not generated, I did some research in the forum:

    The server have been alive for more than 24 hours
    In the folder of stats only are a index.php and .htpasswd_stats files
    I tried switching the Webstatistics program, also set to none, I removed the folder and when is created again, only have the files mentioned above

    /var/www/" failed (2: No such file or directory)
    folder permissions
    drwxr-xr-x 2 root root    4096 May 12 01:54 .
    drwxr-x--x 7 web1 client1 4096 May 12 01:22 ..
    -rwxr-xr-x 1 root root     124 May 12 01:54 .htpasswd_stats
    -rw-r--r-- 1 root root    2173 May 12 01:54 index.php
    Last edited: May 12, 2020
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Did you enable stats for this site, and setup a password?
  3. Joseph811

    Joseph811 New Member

    Thanks for you support
    Yes, that was the first thing I did
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    When you switch the stats program, then you have to wait another 24 hours.

    Regarding awtats settings, please check that the paths and programs mentioned there exist on your server in that paths.
    Th0m likes this.
  5. Joseph811

    Joseph811 New Member

    ls -l /etc/awstats/
    total 72
    -rw-r--r-- 1 root root 63662 Feb  1  2018 awstats.conf
    -rw-r--r-- 1 root root   252 May 11 15:45 awstats.conf.local
    -rw-r--r-- 1 root root   206 May 11 16:05 awstats.domain.tdl.conf
    ls -l /var/lib/awstats/
    total 0
     ls -l /usr/lib/cgi-bin/
    total 5236
    -rwxr-xr-x 1 root root  685600 Feb  1  2018
    lrwxrwxrwx 1 root root      29 May 11 15:08 php -> /etc/alternatives/php-cgi-bin
    -rwxr-xr-x 1 root root 4670888 Feb 16 10:07 php7.3
    ls -l /usr/share/awstats/tools/
    total 64
    -rwxr-xr-x 1 root root 19807 Feb  1  2018
    -rwxr-xr-x 1 root root  1436 Dec 15  2017
    -rwxr-xr-x 1 root root 33291 Aug 27  2016
    -rwxr-xr-x 1 root root   977 Dec 15  2017
    I have another strage behavior when acceding to server.domain.tld:8081/phpmyadmin
    The $cfg['TempDir'] (/usr/share/phpmyadmin/tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.
    but when I access to phpmyadmin from a site created in the panel, e.g anotherdomain.tld/phpmyadmin there is no issue at all

    I use this path /usr/share/phpmyadmin/tmp/ because in the new versions of phpmyadmin in the file /usr/share/phpmyadmin/libraries/vendor_config.php the cache folder is set like this: define('TEMP_DIR', ROOT_PATH . 'tmp/');
    ls -l /usr/share/phpmyadmin
    drwxrwxr-x  3 www-data www-data   4096 May 11 17:15 tmp
    I have tried the old method with no sucess
    mkdir -p /var/lib/phpmyadmin/tmp
    chown -R www-data:www-data /var/lib/phpmyadmin
    define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');
    any thoughts?
    Last edited: May 13, 2020
  6. Joseph811

    Joseph811 New Member

    After 24h the stats was generated
    Thanks for you support, much apreciate
    Any hint regarding the phpmyadmin thing?
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Is this an Nginx server? On Apache servers, you would normally not use port 8081.
  8. Joseph811

    Joseph811 New Member

    The problem was the fastcgi_pass unix:/var/lib/php7.3-fpm/apps.sock;
    I deactivated the apps.vhost in order that the server dont run any other service apart of nginx and pure-ftp
    I modified the ispconfig.vhost for phpmyadmin with this fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
    Here is the full phpmyadmin block:
    location /phpmyadmin {
                   root /usr/share/;
                   index index.php index.html index.htm;
                   location ~ ^/phpmyadmin/(.+\.php)$ {
                           try_files $uri =404;
                           root /usr/share/;
                           fastcgi_param  QUERY_STRING       $query_string;
                           fastcgi_param  REQUEST_METHOD     $request_method;
                           fastcgi_param  CONTENT_TYPE       $content_type;
                           fastcgi_param  CONTENT_LENGTH     $content_length;
                           fastcgi_param  SCRIPT_FILENAME   $request_filename;
                           fastcgi_param  SCRIPT_NAME       $fastcgi_script_name;
                           fastcgi_param  REQUEST_URI       $request_uri;
                           fastcgi_param  DOCUMENT_URI      $document_uri;
                           fastcgi_param  DOCUMENT_ROOT     $document_root;
                           fastcgi_param  SERVER_PROTOCOL   $server_protocol;
                           fastcgi_param  GATEWAY_INTERFACE CGI/1.1;
                           fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
                           fastcgi_param  REMOTE_ADDR        $remote_addr;
                           fastcgi_param  REMOTE_PORT        $remote_port;
                           fastcgi_param  SERVER_ADDR        $server_addr;
                           fastcgi_param  SERVER_PORT        $server_port;
                           fastcgi_param  SERVER_NAME        $server_name;
                           fastcgi_param  HTTPS              $https;
                           fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
                              # PHP only, required if PHP was built with --enable-force-cgi-redirect
                           fastcgi_param  REDIRECT_STATUS    200;
                           fastcgi_index index.php;
                           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                           fastcgi_buffer_size 128k;
                           fastcgi_buffers 256 4k;
                           fastcgi_busy_buffers_size 256k;
                           fastcgi_temp_file_write_size 256k;
                           fastcgi_read_timeout 1200;
                           fastcgi_intercept_errors on;
                           fastcgi_param  REQUEST_SCHEME     $scheme;
                   location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                           root /usr/share/;
            location /phpMyAdmin {
                   rewrite ^/* /phpmyadmin last;
    be aware that this setting fastcgi_param PATH_INFO $fastcgi_script_name; redirects domain.tld/phpmyadmin to domain.tld when succesful login in phpmyadmin, is that the intend?

    This setting is append in the tutorial of the perfect server with Debian for each site created from the panel to access phpmyadmin panel

    How I can make work a reverse proxy for the ispconfig panel properly, I want to use server.domail.tld instead server.domain.dlt:8080
    I have this ispconfig.vhost
    server {
            listen 8080 ssl;
            listen [::]:8080 ssl ipv6only=on;
           ssl_protocols TLSv1.2;
            ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
            ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
            ssl_prefer_server_ciphers on;
            add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
            ssl_session_cache shared:SSL:50m;
            ssl_session_timeout 5m;
        # redirect to https if accessed with http
        error_page 497 https://$host:8080$request_uri;
            server_name _;
            root   /usr/local/ispconfig/interface/web/;
            client_max_body_size 20M;
            location / {
                   index index.php index.html;
            # serve static files directly
            location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
                   access_log        off;
            location ~ \.php$ {
                   try_files $uri =404;
                   include /etc/nginx/fastcgi_params;
                   fastcgi_pass unix:/var/lib/php7.3-fpm/ispconfig.sock;
                   fastcgi_index index.php;
                   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                   #fastcgi_param PATH_INFO $fastcgi_script_name;
                   fastcgi_buffer_size 128k;
                   fastcgi_buffers 256 4k;
                   fastcgi_busy_buffers_size 256k;
                   fastcgi_temp_file_write_size 256k;
                   fastcgi_read_timeout 1200;
               fastcgi_param HTTP_PROXY "";
            location ~ /\. {
                   deny  all;
    and this is the reverse proxy
    server {
        listen 80;
        listen [::]:80;
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        server_name server.domain.tld;
        # SSL
            ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
            ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;
        # reverse proxy
        location / {
        proxy_http_version  1.1;
        proxy_cache_bypass  $http_upgrade;
        proxy_set_header Upgrade            $http_upgrade;
        proxy_set_header Connection         "upgrade";
        proxy_set_header Host               $host;
        proxy_set_header X-Real-IP          $remote_addr;
        proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto  $scheme;
        proxy_set_header X-Forwarded-Host   $host;
        proxy_set_header X-Forwarded-Port   $server_port;
    It works just fine but when I access to server.domain.tld redirect me to server.domain.tld:8080
    and when I test my site with the report says
    HTTP request to this server failed, see bellow for details.
    HTTP status code Request failed (Too many Redirection)
    Do you know what can be the problem?
    Last edited: May 14, 2020
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I would never run another software like phpmyadmin trough ispconfig vhost.

    You don't need a reverse proxy for that, just change the port in ispconfig vhost to 443 and change server_name from _ to the server name that you want to use to access ISPConfig.

Share This Page