Webalizer & Awstats driving me mental

Discussion in 'Installation/Configuration' started by sheshes, Jan 20, 2011.

  1. sheshes

    sheshes Member

    After a lot of upgrading and with the new addition of Awstats in ISPconfig3 I tried setting stats as they should be for all websites (including the ones that will be created)

    Unfortunately I think I messed up everything.

    when trying to access domain.com/stats I am asked for a password which never goes through and when it does I get an Error 403 Forbidden. This happens to all websites new and old and with both Webalizer and Awstats.

    Is there any way I can remove both webalizer and awstats along with the configuration and set it up again properly (i need some quidelines on this also)

    It's a handy tool and a must to all my websites so I would really appreciate some help here.

    Thanks
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Did you use the correct username? It is listed in the .htpasswd file that is referenced in the .htaccess file inside the stats directory. Also, did you take a look at the stats directory? Is it empty, or are there files?
     
  3. 8omas

    8omas Member HowtoForge Supporter

    I have the same problem
    I have set a password for the user admin, and when I type the correct user/pass combination I get a forbidden page.

    The user is admin and the pass is correct.
    I use awstats.
    The stats folder HAS files in it.

    UPDATE
    I forgot to mention, that when I disable the user/pass (through .htaccess) I can see the statistics
     
    Last edited: Feb 16, 2011
  4. 8omas

    8omas Member HowtoForge Supporter

    REPLY to my last UPDATE:
    Unfortunately I can not see stats even if I disable .htaccess

    The only different thing that I did from the guides and the manual is to enable ssl over ispconfig interface.

    In the error log of apache I get this:
    Code:
    File does not exist: /var/www/ispconfig/stats
    But I type in the browser address :
    http://www.somesite.gr/stats

    Is this a bug??
     
  5. 8omas

    8omas Member HowtoForge Supporter

    I found the solution

    Something is happening with the DirectoryIndex directive
    In /etc/apache2/mods-enabled/dir.conf I have :

    Code:
    <IfModule mod_dir.c>
    
              DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
    
    </IfModule>
    
    But I must type the http://www.somesite.gr/stats/index.html to see the stats!!!!
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Can you post the vhost configuration of somesite.gr?
     
  7. 8omas

    8omas Member HowtoForge Supporter

    This is my vhost. I didn't touch anything manually

    Code:
    <Directory /var/www/somesite.gr>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    <VirtualHost 1.2.3.4:80>
          DocumentRoot /var/www/somesite.gr/web
    
        ServerName somesite.gr
        ServerAlias www.somesite.gr
        ServerAdmin [email protected]
    
        ErrorLog /var/log/ispconfig/httpd/somesite.gr/error.log
    
    
        ErrorDocument 400 /error/400.html
        ErrorDocument 401 /error/401.html
        ErrorDocument 403 /error/403.html
        ErrorDocument 404 /error/404.html
        ErrorDocument 405 /error/405.html
        ErrorDocument 500 /error/500.html
        ErrorDocument 503 /error/503.html
    
        <Directory /var/www/somesite.gr/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
        <Directory /var/www/clients/client2/web5/web>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    
    
        # suexec enabled
        SuexecUserGroup web5 client2
        # Clear PHP settings of this website
        <FilesMatch "\.ph(p3?|tml)$">
            SetHandler None
        </FilesMatch>
        # php as fast-cgi enabled
        <IfModule mod_fcgid.c>
    
              # SocketPath /tmp/fcgid_sock/
    
              # IdleTimeout n (3600 seconds)
              # An idle fastcgi application will be terminated after IdleTimeout seconds.
          IdleTimeout 3600
    
              # ProcessLifeTime n (7200 seconds)
          # A fastcgi application will be terminated if lifetime expired, even no error is detected.
          ProcessLifeTime 7200
    
              # MaxProcessCount n (1000)
          # The max count of total fastcgi process count.
          # MaxProcessCount 1000
    
              # DefaultMinClassProcessCount n (3)
          # The minimum number of fastcgi application instances for any one fastcgi application.
          # Idle fastcgi will not be killed if their count is less than n
          # Set this to 0, and tweak IdleTimeout
              DefaultMinClassProcessCount 0
    
              # DefaultMaxClassProcessCount n (100)
          # The maximum number of fastcgi application instances allowed to run for
          # particular one fastcgi application.
          DefaultMaxClassProcessCount 100
              # IPCConnectTimeout n (3 seconds)
          # The connect timeout to a fastcgi application.
          IPCConnectTimeout 8
    
              # IPCCommTimeout n (20 seconds)
          # The communication timeout to a fastcgi application. Please increase this
          # value if your CGI have a slow initialization or slow respond.
          IPCCommTimeout 360
    
              # BusyTimeout n (300 seconds)
          # A fastcgi application will be terminated if handing a single request
          # longer than busy timeout.
              BusyTimeout 300
    
        </IfModule>
        <Directory /var/www/somesite.gr/web>
            AddHandler fcgid-script .php .php3 .php4 .php5
            FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
            Options +ExecCGI
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
            <Directory /var/www/clients/client2/web5/web>
            AddHandler fcgid-script .php .php3 .php4 .php5
            FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
            Options +ExecCGI
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    F
        # add support for apache mpm_itk
        <IfModule mpm_itk_module>
          AssignUserId web5 client2
        </IfModule>
    
        <IfModule mod_dav_fs.c>
          # DO NOT REMOVE THE COMMENTS!
          # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
          # WEBDAV BEGIN
          # WEBDAV END
        </IfModule>
    
    
    </VirtualHost>
    
    
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Do you maybe have another DirectoryIndex directive anywhere else in your Apache configuration?

    What's the output of
    Code:
    ls -la /var/www/somesite.gr/web/stats/
    ?
     
  9. J0s3ph

    J0s3ph New Member

    This topic is the answer, just wanted to post it because I have the same problem, here.
    ls -la /var/www/somesite.gr/web/stats/
    Nothing in there. Only a htaccess file. It contains the following.
    Code:
    AuthType Basic
    AuthName "Members Only"
    AuthUserFile /var/www/clients/client1/web2/.htpasswd_stats
    require valid-user
    Even I see, with my newbie skills, that there is something not right here. Where is the instruction for AWStats?

    BTW: Thanks for your help, Falko!
     
  10. 8omas

    8omas Member HowtoForge Supporter

    As I can remember I didn't Add any DirectoryIndex.

    The output of ls -al is :
    Code:
    drwxr-xr-x  2 root root     4096 Feb 19 00:30 .
    drwx--x--- 15 web5 client2  4096 Feb 16 21:08 ..
    -rw-r--r--  1 root root     5877 Feb 19 00:30 awstats.somesite.gr.alldomains.html
    -rw-r--r--  1 root root     5913 Feb 19 00:30 awstats.somesite.gr.allhosts.html
    -rw-r--r--  1 root root     5284 Feb 19 00:30 awstats.somesite.gr.allrobots.html
    -rw-r--r--  1 root root     5550 Feb 19 00:30 awstats.somesite.gr.browserdetail.html
    -rw-r--r--  1 root root     5604 Feb 19 00:30 awstats.somesite.gr.errors404.html
    -rw-r--r--  1 root root     5083 Feb 19 00:30 awstats.somesite.gr.keyphrases.html
    -rw-r--r--  1 root root     5071 Feb 19 00:30 awstats.somesite.gr.keywords.html
    -rw-r--r--  1 root root     5921 Feb 19 00:30 awstats.somesite.gr.lasthosts.html
    -rw-r--r--  1 root root     5274 Feb 19 00:30 awstats.somesite.gr.lastrobots.html
    -rw-r--r--  1 root root     5475 Feb 19 00:30 awstats.somesite.gr.osdetail.html
    -rw-r--r--  1 root root     5217 Feb 19 00:30 awstats.somesite.gr.refererpages.html
    -rw-r--r--  1 root root     5182 Feb 19 00:30 awstats.somesite.gr.refererse.html
    -rw-r--r--  1 root root     4258 Feb 19 00:30 awstats.somesite.gr.session.html
    -rw-r--r--  1 root root     5022 Feb 19 00:30 awstats.somesite.gr.unknownbrowser.html
    -rw-r--r--  1 root root     5289 Feb 19 00:30 awstats.somesite.gr.unknownip.html
    -rw-r--r--  1 root root     4996 Feb 19 00:30 awstats.somesite.gr.unknownos.html
    -rw-r--r--  1 root root    19910 Feb 19 00:30 awstats.somesite.gr.urldetail.html
    -rw-r--r--  1 root root     7024 Feb 19 00:30 awstats.somesite.gr.urlentry.html
    -rw-r--r--  1 root root     7531 Feb 19 00:30 awstats.somesite.gr.urlexit.html
    -rwxr-xr-x  1 root root      117 Feb 17 22:25 .htaccess
    -rw-r--r--  1 root root    74627 Feb 19 00:30 index.html
     
  11. 8omas

    8omas Member HowtoForge Supporter

    I just found out that there was another directive in the parent folder inside another .htaccess file.

    Thanks falco.

    MY BIG LESSON: "Always look the .htaccess files provided by CMS" (like Drupal, Wordpress, Joomla etc)
     
    Last edited: Feb 20, 2011

Share This Page