Current time: 11-22-2024, 10:32 PM Hello There, Guest! (LoginRegister)


Post Reply 
[SOLVED] AWStats on FreeBSD -> /awstats/ was not found
Author Message
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #1
Question [SOLVED] AWStats on FreeBSD -> /awstats/ was not found
Aloá Hé,

i spend my time to port ispCP to FreeBSD, looks good so far.
The current topic of the day is AWStats. The problem is that i´m unable to view the Stats and get this Error here:
Code:
Not Found

The requested URL /awstats/ was not found on this server.
Here ist the default.err:
Code:
[Tue Mar 09 07:51:03 2010] [notice] Apache/2.2.14 (FreeBSD) mod_ssl/2.2.14 OpenSSL/0.9.8k mod_fastcgi/2.4.6 configured -- resuming normal operations
[Tue Mar 09 07:51:03 2010] [error] [client 127.0.0.1] File does not exist: /usr/local/www/awstats/cgi-bin/awstats.pl/
[Tue Mar 09 07:51:04 2010] [error] [client 127.0.0.1] File does not exist: /usr/local/www/awstats/cgi-bin/awstats.pl/
The "awstats.pl" File itself exist:
Code:
matrix# ls -l /usr/local/www/awstats/cgi-bin/
total 714
-r-xr-xr-x  1 root  wheel    7126 Feb 23 00:16 awredir.pl*
-r--r--r--  1 root  wheel   60967 Feb 23 00:16 awstats.model.conf
-rw-r-xr-x  1 root  wheel  624760 Feb 23 00:16 awstats.pl*
drwxr-xr-x  5 root  wheel    1536 Feb 23 00:16 lang/
drwxr-xr-x  2 root  wheel     512 Feb 23 00:16 lib/
drwxr-xr-x  3 root  wheel     512 Feb 23 00:16 plugins/
The permissions looks ok for me, but of course the file "/usr/local/www/awstats/cgi-bin/awstats.pl/" does not exists.
Here is the Config:
Code:
#
# AWStats Begin
#

Alias /awstatsicons "/usr/local/www/data/awstats/icon/"


NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>

    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteRule ^/stats/(.+)/$ http://localhost/awstats/?config=$1 [P]
        RewriteRule ^/stats/(.+)/awstats.pl(.*)$ http://localhost/awstats/$2 [P]
        RewriteRule ^/stats/(.*)$ http://localhost/stats/$1/ [R]
    </IfModule>

    ScriptAlias /awstats "/usr/local/www/awstats/cgi-bin/awstats.pl"

    <Directory /usr/local/www/awstats/cgi-bin>
        AllowOverride none
        Options +ExecCGI
        DirectoryIndex awstats.pl
        Order allow,deny
        Allow from all
    </Directory>

</VirtualHost>

#
# AWStats End
#
As you can see there is no "/" on the end of the ScriptAlias ?!
I´m not sure if this is the Error...

The AWStasConfig for the Domain exists:
Code:
matrix# ls -l /usr/local/etc/awstats
total 60
-rw-r--r--  1 root  wheel  60785 Mar  4 14:58 awstats.matrix.my-domain.tld.conf
matrix#

Thanks & Greez
BeNe
(This post was last modified: 03-10-2010 04:52 PM by BeNe.)
03-09-2010 06:30 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: AWStats on FreeBSD -> /awstats/ was not found
Try with:
Code:
Options +ExecCGI -MultiViews

Additionally, make sure that the proxypass directive on the main domains isn't forcing this slash at the end of the awstats.pl path and/or disabling MultiViews directly in there...
(This post was last modified: 03-09-2010 07:22 PM by kilburn.)
03-09-2010 07:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #3
RE: AWStats on FreeBSD -> /awstats/ was not found
Hey killburn, thanks for your reply to my problems here again Wink
I can´t find a line here that should force the slash on the end.
To disable the MultiView is also a good point but brings not any effect.

Here is the one and only VHost in the ispconf.conf
Code:
NameVirtualHost 93.12.34.56:80

# httpd [{DMN_GRP}] dmn group entry BEGIN.
# httpd [{DMN_GRP}] dmn group entry END.
# httpd [my-domain.tld] dmn group entry BEGIN.

<IfModule mod_cband.c>
    <CBandUser my-domain.tld>
        # CBandUserLimit 0Mi
        # CBandUserScoreboard /usr/local/www/data/scoreboards/my-domain.tld
        # CBandUserPeriod 4W
        # CBandUserPeriodSlice 1W
        # CBandUserExceededURL http://admin.my-domain.tld/errors/bw_exceeded.html
    </CBandUser>
</IfModule>


# httpd [{SUB_NAME}] sub entry BEGIN.
# httpd [{SUB_NAME}] sub entry END.

# httpd [my-domain.tld] dmn entry BEGIN.
<VirtualHost 93.12.34.56:80>

    <IfModule suexec_module>
           SuexecUserGroup vu2001 vu2001
    </IfModule>

    ServerAdmin     webmaster@my-domain.tld
    DocumentRoot    /usr/local/www/data/virtual/my-domain.tld/htdocs

    ServerName      my-domain.tld
    ServerAlias     www.my-domain.tld my-domain.tld *.my-domain.tld vu2001.admin.my-domain.tld

    Alias /errors   /usr/local/www/data/virtual/my-domain.tld/errors/

    RedirectMatch permanent ^/ftp[\/]?$         http://admin.my-domain.tld/ftp/
    RedirectMatch permanent ^/pma[\/]?$         http://admin.my-domain.tld/pma/
    RedirectMatch permanent ^/webmail[\/]?$     http://admin.my-domain.tld/webmail/
    RedirectMatch permanent ^/ispcp[\/]?$       http://admin.my-domain.tld/

    ErrorDocument 401 /errors/401.html
    ErrorDocument 403 /errors/403.html
    ErrorDocument 404 /errors/404.html
    ErrorDocument 500 /errors/500.html
    ErrorDocument 503 /errors/503.html

    <IfModule mod_cband.c>
        CBandUser my-domain.tld
    </IfModule>

    # httpd awstats support BEGIN.

   ProxyRequests Off

   <Proxy *>
      Order deny,allow
      Allow from all
   </Proxy>

   ProxyPass                    /stats  http://localhost/stats/my-domain.tld
   ProxyPassReverse             /stats  http://localhost/stats/my-domain.tld

    <Location /stats>
        <IfModule mod_rewrite.c>
            Options -MultiViews
            RewriteEngine on
            RewriteRule ^(.+)\?config=([^\?\&]+)(.*) $1\?config=my-domain.tld&$3 [NC,L]
        </IfModule>
        AuthType Basic
        AuthName "Statistics for domain my-domain.tld"
        AuthUserFile /usr/local/www/data/virtual/my-domain.tld/.htpasswd
        AuthGroupFile /usr/local/www/data/virtual/my-domain.tld/.htgroup
        Require group statistics
    </Location>

   # httpd awstats support END.

    # httpd dmn entry cgi support BEGIN.
    ScriptAlias /cgi-bin/ /usr/local/www/data/virtual/my-domain.tld/cgi-bin/
    <Directory /usr/local/www/data/virtual/my-domain.tld/cgi-bin>
        AllowOverride AuthConfig
        #Options ExecCGI
        Order allow,deny
        Allow from all
    </Directory>
    # httpd dmn entry cgi support END.

    <Directory /usr/local/www/data/virtual/my-domain.tld/htdocs>
        # httpd dmn entry PHP support BEGIN.
        # httpd dmn entry PHP support END.
        Options -Indexes Includes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    # httpd dmn entry PHP2 support BEGIN.
    <IfModule mod_php5.c>
        php_admin_value open_basedir "/usr/local/www/data/virtual/my-domain.tld/:/usr/local/www/data/virtual/my-domain.tld/phptmp/:/usr/local/lib/php/20060613/"
        php_admin_value upload_tmp_dir "/usr/local/www/data/virtual/my-domain.tld/phptmp/"
        php_admin_value session.save_path "/usr/local/www/data/virtual/my-domain.tld/phptmp/"
        php_admin_value sendmail_path '/usr/sbin/sendmail -f vu2001 -t -i'
    </IfModule>
    <IfModule mod_fastcgi.c>
        ScriptAlias /php5/ /usr/local/www/data/fcgi/my-domain.tld/
        <Directory "/usr/local/www/data/fcgi/my-domain.tld">
            AllowOverride None
            Options +ExecCGI -MultiViews -Indexes
            Order allow,deny
            Allow from all
        </Directory>
    </IfModule>
    <IfModule mod_fcgid.c>
                Include /usr/local/etc/apache22/extra/fcgid_ispcp.conf
        <Directory /usr/local/www/data/virtual/my-domain.tld/htdocs>
            FCGIWrapper /usr/local/www/data/fcgi/my-domain.tld/php5-fcgi-starter .php
            Options +ExecCGI
        </Directory>
        <Directory "/usr/local/www/data/fcgi/my-domain.tld">
            AllowOverride None
            Options +ExecCGI MultiViews -Indexes
            Order allow,deny
            Allow from all
        </Directory>
    </IfModule>
    # httpd dmn entry PHP2 support END.

    Include /usr/local/etc/apache22/ispcp/my-domain.tld.conf

</VirtualHost>

Greez BeNe
03-09-2010 10:17 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: AWStats on FreeBSD -> /awstats/ was not found
Try to open "http://localhost/stats/my-domain.tld" from the server (using lynx/links/whatever) and see if the problem persists. This way we will know if we have to concentrate on the "localhost" virtualhost or on the user's one.

Edit: because you *do* have mod_rewrite installed/enabled, don't you?
(This post was last modified: 03-09-2010 11:01 PM by kilburn.)
03-09-2010 10:59 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #5
RE: AWStats on FreeBSD -> /awstats/ was not found
Quote:Try to open "http://localhost/stats/my-domain.tld" from the server (using lynx/links/whatever) and see if the problem persists. This way we will know if we have to concentrate on the "localhost" virtualhost or on the user's one.

I already did this with w3m:
Code:
matrix# w3m http://localhost/stats/matrix.my-domain.tld
Not Found
The requested URL /awstats/ was not found on this server.
matrix#

Yes mod_rewrite is enabled in my httpd.conf
Code:
LoadModule rewrite_module libexec/apache22/mod_rewrite.so

Here is the full list of enabled mods:
Code:
matrix# apachectl -M
Loaded Modules:
core_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
authn_file_module (shared)
authn_dbm_module (shared)
authn_anon_module (shared)
authn_dbd_module (shared)
authn_default_module (shared)
authn_alias_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_dbm_module (shared)
authz_owner_module (shared)
authz_default_module (shared)
auth_basic_module (shared)
auth_digest_module (shared)
file_cache_module (shared)
cache_module (shared)
disk_cache_module (shared)
dbd_module (shared)
dumpio_module (shared)
include_module (shared)
filter_module (shared)
charset_lite_module (shared)
deflate_module (shared)
log_config_module (shared)
logio_module (shared)
env_module (shared)
mime_magic_module (shared)
cern_meta_module (shared)
expires_module (shared)
headers_module (shared)
usertrack_module (shared)
unique_id_module (shared)
setenvif_module (shared)
version_module (shared)
proxy_module (shared)
proxy_http_module (shared)
ssl_module (shared)
proxy_connect_module (shared)
mime_module (shared)
status_module (shared)
autoindex_module (shared)
asis_module (shared)
info_module (shared)
suexec_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
imagemap_module (shared)
actions_module (shared)
speling_module (shared)
userdir_module (shared)
alias_module (shared)
rewrite_module (shared)  <----- HERE -----
cband_module (shared)
fastcgi_module (shared)
Syntax OK
matrix#

Greez BeNe
03-09-2010 11:38 PM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #6
RE: AWStats on FreeBSD -> /awstats/ was not found
Are you testing on a spare machine? May I be able to access it and play with the settings?
03-10-2010 01:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: AWStats on FreeBSD -> /awstats/ was not found
This is my test enviroment in the office.
I have no problems to give you an access to the Server Wink

Will send you an P.M.

Greez BeNe
03-10-2010 01:53 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #8
RE: AWStats on FreeBSD -> /awstats/ was not found
Great, let's see if we find something in there Smile
03-10-2010 02:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #9
RE: [SOLDED] AWStats on FreeBSD -> /awstats/ was not found
Kilburn found the Error!
My Apache was compiled without cgi and cgid.
I recompiled the Apache22 after that hint and AWstats works now.
The images for AWStats are still missing
Code:
client denied by server configuration
But that should not be that thing this time.

Big thanks again, kilburn!!!

Greez BeNe
(This post was last modified: 03-10-2010 07:50 AM by BeNe.)
03-10-2010 07:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #10
RE: [SOLDED] AWStats on FreeBSD -> /awstats/ was not found
You're welcome! I love to sold problems! Big Grin

PS: Look at your post's title Wink
03-10-2010 08:33 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)