HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   awstats.con stops apache (http://www.howtoforge.com/forums/showthread.php?t=56932)

veneficus 15th April 2012 19:52

awstats.con stops apache
 
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


falko 16th April 2012 10:10

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

veneficus 16th April 2012 12:37

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

till 16th April 2012 14:48

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.

veneficus 16th April 2012 15:21

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 :)

till 16th April 2012 15:26

No, the procedure is:

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

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

veneficus 16th April 2012 15:43

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


All times are GMT +2. The time now is 22:54.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.