ISPConfig 2.2.34 und Webalizer 2.21 - AUA

schmidtedv

New Member
1 Frage: Kann ich gefahrlos, zwecks Vermeidung unnnötiger Statistik, einfach die Datei "webalizer" unter /etc/cron.daily löschen? Damit legt er ja nur eine Statistik unter /var/www/webalizer ab die keiner braucht!?

2 Frage / Problem: Ich habe den webalizer von Debian Etch entfernt (apt-get remove webalizer) um mir dann nach folgender Anleitung die aktuelle, deutsche Version auf den Server zu packen, was scheinbar nur halb funktioniert:

Code:
apt-get install libgd2-xpm-dev
wget [URL]ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.21-02-src.tgz[/URL]
tar xzf webalizer-2.21-02-src.tgz
cd webalizer-2.21-02
./configure --with-language=german
make
make install
ln -s /usr/local/bin/webalizer /usr/bin/webalizer

Hiernach habe ich dann folgende Pfade / Version auf dem Server:

Code:
:~# which webalizer
/usr/local/bin/webalizer
:~# webalizer -V
Webalizer V2.21-02 (Linux 2.6.9-023stab048.6-enterprise i686) German
Copyright 1997-2009 by Bradford L. Barrett

Zudem habe ich die webalizer.conf unter /root/ispconfig/scripts/shell mit der aktuellen ausgetauscht (dabei die Optionen der ISPConfig-Variante übernommen und noch die GeoDB.dat mit reingenommen.

Alle alten /webalizer und /stats-Verzeichnisse der Webs habe ich gelöscht und nun über Nacht abgewartet.

Heute morgen sind dann netterweise die /webalizer-Verzeichnisse inkl. .htaccess neu angelegt worden (so weit, so schön) aber leider keine Statistik drin.

Die Parameter scheinen sich nicht geändert zu haben, daran sollte es also nicht liegen....könnte es sonst noch Gründe geben, oder muss ich einfach länger warten ???
 

Till

Administrator
zu 1) Hats Du schon im anderen thread gefragt und hab ich dort auch gerade beantwortet.

zu 2) Du msuut Deinen webalizer so konfigurieren, dass er die selben Pfade nutz wie der standard von debian. Die Pfade kannst Du beim configure angeben, wie die Parameter genau sind, erfährst Du mit:

./configure --help
 

schmidtedv

New Member
Zunächst...danke für die prompte Antwort. Zu den Pfaden hab ich nun noch eine Frage. Ich kann ja mittels "which webalizer" sehen, wo er ist (hier ein symlink) und genau das macht ja auch das script von ispconfig.

Das Paket unter debian.org ist, soweit ich die Pfade sehe, zum von mir genutzten aktuellen Paket von der Herstellerseite identisch:

Debian-Version:

Code:
lvps92-51-165-44:~/webalizer-2.01.10.orig# ./configure --help
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print `checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
--enable and --with options recognized:
--enable-static           Build as static executable
--enable-debug            Compile with debugging code
--with-etcdir=DIR         Where to look for default config file [/etc]
--with-gdlib=DIR          Where to additionally look for libgd.a
--with-gd=DIR             Where to additionally look for gd headers
--with-z-inc=DIR          Alternate location for libz headers
--with-zlib=DIR           Alternate location for libz library
--with-png-inc=DIR        Alternate location of png header files
--with-png=DIR            Alternate location for libpng library
--with-db=DIR             Alternate location for db headers
--with-dblib=DIR          Alternate location for db library
--enable-dns              Enable DNS lookup code
--with-language=language  Use 'language' (default is english)

Meine genutzte Version:

Code:
lvps92-51-165-44:~/webalizer-2.21-02# ./configure --help
`configure' configures webalizer 2.20 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR          info documentation [DATAROOTDIR/info]
  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR           man documentation [DATAROOTDIR/man]
  --docdir=DIR           documentation root [DATAROOTDIR/doc/webalizer]
  --htmldir=DIR          html documentation [DOCDIR]
  --dvidir=DIR           dvi documentation [DOCDIR]
  --pdfdir=DIR           pdf documentation [DOCDIR]
  --psdir=DIR            ps documentation [DOCDIR]
Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-largefile     omit support for large files
  --enable-static         Build as static executable       [default=no]
  --enable-debug          Compile with debugging code      [default=no]
  --enable-dns            Enable DNS/GeoDB lookup code     [default=yes]
  --enable-bz2            Enable BZip2 decompression code  [default=no]
  --enable-geoip          Enable GeoIP geolocation code    [default=no]
Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-gd=DIR           Alternate location for gd header files
  --with-gdlib=DIR        Alternate location for gd library
  --with-png=DIR          Alternate location for png header files
  --with-pnglib=DIR       Alternate location for png library
  --with-z=DIR            Alternate location for libz header files
  --with-zlib=DIR         Alternate location for z library
  --with-db=DIR           Alternate location for libdb header files
  --with-dblib=DIR        Alternate location for db library
  --with-bz2=DIR          Alternate location for bz2 header files
  --with-bz2lib=DIR       Alternate location for bz2 library
  --with-geoip=DIR        Alternate location for libGeoIP header files
  --with-geoiplib=DIR     Alternate location for geoip library
  --with-geodb=DIR        Default GeoDB data dir [/usr/share/GeoDB]
  --with-language=name    Use language 'name' (default is english)
Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Hab ich dich da nun falsch verstanden oder muss ich davon ausgehen, das ich die aktuelle Version nicht unter debian nutzen kann? Die webalizer.conf.sample legt meine Version unter /usr/local/etc ab und erstellt kein bzw. nutzt nicht das /etc/webalizer-Verzeichnis, aber das sollte doch eigentlich egal sein...oder???
 

schmidtedv

New Member
Noch ein Nachtrag...habe mal als root folgendes probiert:

Code:
:~# /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php
Fehler: Kann die Protokolldatei nicht öffnen. /var/www/web1/log/web.log (symlink)
Fehler: Kann die Protokolldatei nicht öffnen. /var/www/web2/log/web.log (symlink)
 
Domain: webseite.de
Log Dir: /var/www/web1/log
Current Log size: 10198359
Domain: webseite.com
Log Dir: /var/www/web2/log
Current Log size: 929346
lvps92-51-165-44:~#

Kommen wir der sache damit näher...kann ich da noch mehr ausprobieren?
 

schmidtedv

New Member
OK, und nun die Lösung:

2.21 hat den auch schon unter howtoforge.com angesprochenen Symlink-Schutz drin...also entweder die alte Version weiternutzen, oder, wie ich, anfangen zu basteln.

Im Prinzip wird vor dem ./configure nur eine Bearbeitung folgender Dateien nötig:

graphs.c
output.c
preserve.c
wcmgr.c
webalizer.c

Das Setup bleibt dann wie angesprochen:

apt-get remove webalizer
dpkg --purge "webalizer"
apt-get install libgd2-xpm-dev
wget ftp://ftp.mrunix.net/pub/webalizer/webalizer-2.21-02-src.tgz
tar xzf webalizer-2.21-02-src.tgz
cd webalizer-2.21-02

-> nun die gepatchten Dateien reinkopieren

./configure --with-language=german
make
make install
ln -s /usr/local/bin/webalizer /usr/bin/webalizer
rm -f /root/webalizer-2.21-02-src.tgz
rm -rf /root/webalizer-2.21-02

GeoDB.dat runterladen und nach /usr/share/GeoIP/ kopieren
webalizer.conf nach /root/ispconfig/scripts/shell/ kopieren

und fertig

Ein manueller Test mit /root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php macht dann auch wirklich, was er soll :)
 

Anhänge

  • patch.zip
    67,6 KB · Aufrufe: 373

Till

Administrator
Hi, Ich habe es mal in den bugtracker aufgenommen. Ich denke es sollte reichen einfach den Pfad im webalizer.php zu ändern, so das er den Pfad ohne symlinks nimmt.
 

schmidtedv

New Member
Ok, das wäre natürlich unkomplizierter für die Zukunft.

Da hätte ich noch einen Vorschlag. Es wäre wirklich klasse, das alte Dilemma mit den Subdomains vielleicht einfach als Option zur Auswahl zu stellen. Also eine Auswahl, ob man sub.domain.de nach domain.de/sub aufgelöst haben möchte, oder ob einem lieber wäre, das es wirklich als sub.domain.de angezeigt / genutzt wird...könnte man ja eigentlich mit in die Subdomain-Option einbauen.

Zudem wäre es noch ein nettes Gimmick, wenn der Zonentransfer über ISPConfig begrenzt werden könnte. Mein Template hierzu sieht z.b. so aus:

Code:
options {
        pid-file "{PIDFILE}";
        directory "{BINDDIR}";
        notify yes;
        allow-transfer { erlaubte; dns-server; ips für transfer; };
        listen-on port 53 { 127.0.0.1; 92.51.165.44; };
        listen-on-v6 { none; };
        allow-query { 127.0.0.1; eigene ip;};
        allow-recursion { 127.0.0.1; eigene ip;};
        auth-nxdomain no;
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
};
//
// a caching only nameserver config
//
zone "." {
        type hint;
        file "{HINTFILE}";
};
zone "0.0.127.in-addr.arpa" {
        type master;
        file "{LOCALFILE}";
};
<!-- BEGIN DYNAMIC BLOCK: named_reverse -->
zone "{ZONE}.in-addr.arpa" {
        type master;
        file "pri.{ZONE}.in-addr.arpa";
        allow-query { any; };
};
<!-- END DYNAMIC BLOCK: named_reverse -->
<!-- BEGIN DYNAMIC BLOCK: named -->
zone "{DOMAIN}" {
        type master;
        file "pri.{DOMAIN}";
        allow-query { any; };
};
<!-- END DYNAMIC BLOCK: named -->
<!-- BEGIN DYNAMIC BLOCK: named_slave -->
zone "{DOMAIN}" {
        type slave;
        file "sec.{DOMAIN}";
        masters { {MASTERS}; };
        allow-query { any; };
};
<!-- END DYNAMIC BLOCK: named_slave -->
//// MAKE MANUAL ENTRIES BELOW THIS LINE! ////
 

Werbung

Top