awstats.con stops apache

Discussion in 'Installation/Configuration' started by veneficus, Apr 15, 2012.

  1. veneficus

    veneficus New Member

    Hi to all, after tring to enebla awstats, the statistics come for a while, the no mre pages were reacheble, i try to restart apache, and comment line per line di awstats.con line that gives problem, i had to comment all to stop error then i had other error form the site awstats .conf file so i had to remove all of them and enable weblizer ( that i don't like at all ) i am using ccentos X86X64 release 5.8 here's the errors ihad thanks to all for any reply.

    Code:
    Avvio di httpd: [Sun Apr 15 16:06:40 2012] [warn] The Alias directive in /etc/httpd/conf.d/awstats.conf at line 1 will probably never match because it overlaps an earlier Alia
    [Sun Apr 15 16:06:40 2012] [warn] The ScriptAlias directive in /etc/httpd/conf.d/awstats.conf at line 3 will probably never match because it overlaps an earlier ScriptAlias.
    Syntax error on line 2 of /etc/httpd/conf.d/awstats.sra.it.conf:
    Invalid command 'LogFile="/var/log/ispconfig/httpd/sra.it/yesterday-access.log"', perhaps misspelled or defined by a module not included in the server configuration
                                                               [FALLITO]
    [root@ocsinet ~]# nano /etc/httpd/conf.d/awstats.conf
    [root@ocsinet ~]# nano /etc/httpd/conf.d/awstats.conf
    [root@ocsinet ~]# service httpd restart
    Interruzione di httpd:                                     [FALLITO]
    Avvio di httpd: [Sun Apr 15 16:07:12 2012] [warn] The ScriptAlias directive in /etc/httpd/conf.d/awstats.conf at line 2 will probably never match because it overlaps an earlieptAlias.
    Syntax error on line 2 of /etc/httpd/conf.d/awstats.sra.it.conf:
    Invalid command 'LogFile="/var/log/ispconfig/httpd/sra.it/yesterday-access.log"', perhaps misspelled or defined by a module not included in the server configuration
                                                               [FALLITO]
    [root@ocsinet ~]# nano /etc/httpd/conf.d/awstats.conf
    [root@ocsinet ~]# service httpd restart
    Interruzione di httpd:                                     [FALLITO]
    Avvio di httpd: [Sun Apr 15 16:07:55 2012] [warn] The ScriptAlias directive in /etc/httpd/conf.d/awstats.conf at line 1 will probably never match because it overlaps an earlieptAlias.
    Syntax error on line 2 of /etc/httpd/conf.d/awstats.sra.it.conf:
    Invalid command 'LogFile="/var/log/ispconfig/httpd/sra.it/yesterday-access.log"', perhaps misspelled or defined by a module not included in the server configuration
                                                               [FALLITO]
    [root@ocsinet ~]# nano /etc/httpd/conf.d/awstats.conf
    [root@ocsinet ~]# rm  /etc/httpd/conf.d/awstats.conf
    rm: rimuovere regular file `/etc/httpd/conf.d/awstats.conf'? y
    [root@ocsinet ~]# nano /etc/httpd/conf.d/awstats.conf
    [root@ocsinet ~]# service httpd restart
    Interruzione di httpd:                                     [FALLITO]
    Avvio di httpd: httpd: Syntax error on line 211 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/awstats.sra.it.conf: Could not open configuration fic/httpd/conf.d/awstats.conf: No such file or directory
                                                               [FALLITO]
    [root@ocsinet ~]# nano /etc/httpd/conf.d/awstats.sra.it.conf
    [root@ocsinet ~]# service httpd restart
    Interruzione di httpd:                                     [FALLITO]
    Avvio di httpd: Syntax error on line 2 of /etc/httpd/conf.d/awstats.sra.it.conf:
    Invalid command 'LogFile="/var/log/ispconfig/httpd/sra.it/yesterday-access.log"', perhaps misspelled or defined by a module not included in the server configuration
                                                               [FALLITO]
    [root@ocsinet ~]# rm  /etc/httpd/conf.d/awstats.sra.it.conf
    rm: rimuovere regular file `/etc/httpd/conf.d/awstats.sra.it.conf'? y
    [root@ocsinet ~]# service httpd restart
    Interruzione di httpd:                                     [FALLITO]
    Avvio di httpd: [Sun Apr 15 16:09:06 2012] [warn] NameVirtualHost 130.255.144.130:80 has no VirtualHosts
    [Sun Apr 15 16:09:06 2012] [warn] NameVirtualHost 130.255.144.130:443 has no VirtualHosts
    [Sun Apr 15 16:09:06 2012] [warn] NameVirtualHost 192.168.254.30:80 has no VirtualHosts
    [Sun Apr 15 16:09:06 2012] [warn] NameVirtualHost 192.168.254.30:443 has no VirtualHosts
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Please post the contents of your /etc/httpd/conf.d/awstats.conf and /etc/httpd/conf.d/awstats.sra.it.conf files.
     
  3. veneficus

    veneficus New Member

    basically i did, to have di .conf file, : cp /etc/awstats/awstats.model.conf /etc/httpd/conf.d/awstats.conf


    after that i just commented all the instruction given by the bse file because all of them give a failed starting of apache.

    i used also the command: /usr/local/ispconfig/server/cron_daily.php

    that now gives this error:
    Code:
      /usr/local/ispconfig/server/cron_daily.php
    /usr/local/ispconfig/server/cron_daily.php: line 1: ?php: No such file or direct                                                                                           ory
    /usr/local/ispconfig/server/cron_daily.php: line 3: /aquota.gruop: Permission de                                                                                           nied
    /usr/local/ispconfig/server/cron_daily.php: line 4: syntax error near unexpected                                                                                            token `c'
    /usr/local/ispconfig/server/cron_daily.php: line 4: `Copyright (c) 2007, Till Br                                                                                           ehm, projektfarm Gmbh'
    
    here's first lines of your file :
    Code:
    <?php
    
    /*
    Copyright (c) 2007, Till Brehm, projektfarm Gmbh
    All rights reserved.
    
    Redistribution and use in source and binary forms, with or without modification,
    are permitted provided that the following conditions are met:
    
        * Redistributions of source code must retain the above copyright notice,
          this list of conditions and the following disclaimer.
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        * Neither the name of ISPConfig nor the names of its contributors
          may be used to endorse or promote products derived from this software without
          specific prior written permission.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
    INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */
    
    define('SCRIPT_PATH', dirname($_SERVER["SCRIPT_FILENAME"]));
    require(SCRIPT_PATH."/lib/config.inc.php");
    require(SCRIPT_PATH."/lib/app.inc.php");
    
    set_time_limit(0);
    
    // make sure server_id is always an int
    $conf['server_id'] = intval($conf['server_id']);
    
    
    // Load required base-classes
    $app->uses('ini_parser,file,services,getconf');
    
    
    
    i can't regenerate di site awstats.conf file because it will stop my apache server, maybe i can try doing it this night.

    please help, if you need some kind of access on it i can also create you in pm a user with shell access.

    thanks
     
    Last edited: Apr 16, 2012
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The command is:

    /usr/local/ispconfig/server/cron_daily.sh

    and not:

    /usr/local/ispconfig/server/cron_daily.php

    The file /etc/httpd/conf.d/awstats.conf is not used on a ispconfig system, so if you edited or enabled that, stats will fail. Same when you edited some cron job for awstats as ispconfig uses its own cronjobs, so enabling the system awstats cronjob beside the ispconfig cronjobs will cause errors.
     
    Last edited: Apr 16, 2012
  5. veneficus

    veneficus New Member

    ok so the suggested operation is to delete actual awstats.conf, then do a manual update with the update.php file, then generate an awstat statistics on a site and run the script, am i right?

    thanks for you help :)
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    No, the procedure is:

    1) Delete the file /etc/httpd/conf.d/awstats.conf
    2) Run:

    /usr/local/ispconfig/server/cron_daily.sh
     
  7. veneficus

    veneficus New Member

    ok so i will try it tonight and update you, thanks
     

Share This Page