Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| centos:web_c7:webstats [13.01.2015 06:42. ] – [GeoIP] django | centos:web_c7:webstats [18.11.2024 19:14. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | <WRAP center round alert 60%> | + | ====== Logfileanalyse und -Auswertung mit (Better-)AWStats unter CentOS 7.x ====== |
| - | Artikel aktuell in Bearbeitung ... | + | |
| - | </ | + | |
| - | + | ||
| - | ====== Logfileanalyse und -Auswertung mit (Better)AWStats unter CentOS 7.x ====== | + | |
| {{: | {{: | ||
| - | <WRAP center round important | + | <WRAP center round important |
| **WICHTIG: | **WICHTIG: | ||
| Zeile 48: | Zeile 44: | ||
| # yum install php-gd | # yum install php-gd | ||
| + | bzw. | ||
| + | # yum install php70u-gd -y | ||
| + | bei Verwendung von PHP 7.0 | ||
| ===== Installation ===== | ===== Installation ===== | ||
| Für die Installation von **AWStats** greifen wir auf das **RPM** vom Repository [[centos: | Für die Installation von **AWStats** greifen wir auf das **RPM** vom Repository [[centos: | ||
| Zeile 915: | Zeile 914: | ||
| Für die Abfrage der Statistikdaten mit unserem bevorzugtem Browser, benötigen wir nun noch einen virtuellen Host, den wir nun einrichtenm wollen. | Für die Abfrage der Statistikdaten mit unserem bevorzugtem Browser, benötigen wir nun noch einen virtuellen Host, den wir nun einrichtenm wollen. | ||
| ==== Apache vHost ==== | ==== Apache vHost ==== | ||
| - | Im ersten Konfigurationsbeispiel richten wir uns einen vHOST für unseren Apache-Webserver ein. Hier wurde bei der Installation bereits eine passende Konfigurationsdatei in den Apache-konfigurationspfad | + | Im ersten Konfigurationsbeispiel richten wir uns einen vHOST für unseren Apache-Webserver ein. Hier wurde bei der Installation bereits eine passende Konfigurationsdatei in den Apache-Konfigurationspfad |
| # vim / | # vim / | ||
| <file apache / | <file apache / | ||
| Zeile 943: | Zeile 942: | ||
| </ | </ | ||
| + | # # URL beautifying | ||
| + | < | ||
| + | RewriteEngine | ||
| + | RewriteRule | ||
| + | </ | ||
| ErrorLog logs/ | ErrorLog logs/ | ||
| Zeile 948: | Zeile 952: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | Um nicht später immer einen rießen Rattenschwanz bei der URL mitangeben zu müssen, machen wir noch eine kleine Verschönerungsaktion. In der Konfigurationsdatei ist diese mit **//# URL beautifying// | ||
| Haben wir die Konfigurationsdatei vervollständigt, | Haben wir die Konfigurationsdatei vervollständigt, | ||
| Zeile 954: | Zeile 960: | ||
| | | ||
| - | Ein reload unseres Apache Webserver reicht nun aus, um den neunen | + | Ein reload unseres Apache Webserver reicht nun aus, um den neuen vHOST verfügbar zu haben. |
| # systemctl reload httpd | # systemctl reload httpd | ||
| Zeile 2664: | Zeile 2670: | ||
| {{ : | {{ : | ||
| - | Voraussetzung für die Abfrage über das Perl-Script ist das installierte Perl-Paket **Net:: | + | Voraussetzung für die Abfrage über das Perl-Script ist das installierte Perl-Paket **Net:: |
| # yum install perl-Net-XWhois -y | # yum install perl-Net-XWhois -y | ||
| Zeile 2797: | Zeile 2803: | ||
| </ | </ | ||
| | | ||
| - | === ENGiNX | + | === NGiNX === |
| Die Anpassungen beim Einsatz eines [[|NGiNX]] Webservers sind fast identisch mit denen des Apache Webservers, ändert sich ja nur die Stelle. | Die Anpassungen beim Einsatz eines [[|NGiNX]] Webservers sind fast identisch mit denen des Apache Webservers, ändert sich ja nur die Stelle. | ||
| # vim / | # vim / | ||
| Zeile 2822: | Zeile 2828: | ||
| ===== erstes Ergebnis ===== | ===== erstes Ergebnis ===== | ||
| - | Nach erfolgreicher Konfiguration steht dem ersten Aufruf nichts mehr im Wege. Der Aufruf erfolgt über folgende URL: | + | Nach erfolgreicher Konfiguration steht dem ersten Aufruf nichts mehr im Wege. Dank unserer Rewrite-Regel **URL beautifying** reicht der Aufruf |
| - | $ firefox http://aw-stats.nausch.org/ | + | $ firefox http://awstats.nausch.org/ |
| {{ : | {{ : | ||
| - | <WRAP round tip> | + | ====== Logfileanalyse und -Auswertung mit BetterAWStats unter CentOS 7.x ====== |
| + | Nachdem uns AWStats ja schon viele Dinge bietet, verbessern wir das ganze noch mittels [[http:// | ||
| - | Der Teil nach // | + | Mir persönlich gefällt vor allem neben der optischen Aufmachung, die komfortable Möglichkeit Auswertungen einzelner VHosts zu wechseln. |
| - | Also z.B. <code>http://aw-stats.nausch.org/ | + | ===== Download ===== |
| + | Von der [[http:// | ||
| + | |||
| + | Bevor wir nun das besagte Programmarchiv auf unseren Rechner holen, wechseln wir als erstes hierzu in unser Programmquellen-Verzeichnis. Haben wir selbiges noch nicht angelegt, dann ist natürlich noch dieses anzulegen: | ||
| + | # mkdir -p / | ||
| + | |||
| + | Anschließend wechseln wir in unser Verzeichnis: | ||
| + | # cd / | ||
| + | |||
| + | Nun laden wir das Programmarchiv von der [[http:// | ||
| + | # wget http:// | ||
| + | |||
| + | ===== Installation ===== | ||
| + | Das gerade heruntergeladene // | ||
| + | # unzip betterawstats-1.0.zip -d / | ||
| + | < | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | | ||
| + | | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | inflating: / | ||
| + | | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | | ||
| + | | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | inflating: / | ||
| + | </ | ||
| + | |||
| + | |||
| + | Für den Betrieb von **BetterAWStats** benötigen wir noch das Paket **php-gd** zur PHP Unterstützung der GD Gaphic Library, welches wir noch via **yum** installieren, | ||
| + | yum install php-gd -y | ||
| + | bzw. | ||
| + | # yum install php70u-gd -y | ||
| + | bei Verwendung von PHP 7.0 | ||
| + | ===== Konfiguration ===== | ||
| + | ==== Dokumentation ==== | ||
| + | Detaillierte Hinweise zur Installation und Konfiguration von **BetterAWStats** findet man in der mitgelieferten Installations-Datei. | ||
| + | # cat / | ||
| + | <file txt / | ||
| + | |||
| + | - awstats and generated datafiles from awstats. | ||
| + | - PHP 5.2 or above | ||
| + | - a Webserver that can process PHP files (Apache, IIS etc) | ||
| + | - 1MB space | ||
| + | - A recent browser version that can properly render CSS, such as Opera 9, Firefox 2, IE 7 etc. | ||
| + | - 1024x786 screen or larger | ||
| + | |||
| + | INSTALL PROCEDURE BETTERAWSTATS: | ||
| + | |||
| + | 1. Extract the files into any web-accessible directory, preserving the directory structure. | ||
| + | 2. Edit the file config.php. Specially the paths to the awstats files have to be correct | ||
| + | 3. Open index.php in your browser and you should see the results. | ||
| + | 4. Under Linux, in order to use the online config editor, please make your config.php | ||
| + | file writable by apache: | ||
| + | chown apache: | ||
| + | chmod 664 ./ | ||
| + | and set $BAW_CONF[' | ||
| + | If your BetterAWStats installation is not protected by password, you have to make the | ||
| + | | ||
| + | |||
| + | IMPORTANT NOTES: | ||
| + | |||
| + | It is STRONGLY recommended to password-protect the folder where BetterAWStats is installed | ||
| + | SPECIALLY when using the online config editor. You can use .htaccess files for example. | ||
| + | |||
| + | DAILY USE: | ||
| + | |||
| + | - update your statistics as usual with awstats | ||
| + | - Open BetterAwstats to see the statistics | ||
| + | |||
| + | HOW TO ADD ADITIONAL EXTRA SECTIONS: | ||
| + | |||
| + | Awstats allows to add aditional extra sections with custom stats. In order to create those, | ||
| + | 1. Please edit the file / | ||
| + | 2. Below that, please copy the $BAW_CONF_DIS_DEF section and edit the fariables according to point 1. | ||
| + | 3. Copy the respective section also in config.php and adjust the values accordingly. | ||
| + | |||
| + | </ | ||
| + | ==== Anwendung ==== | ||
| + | Als erstes machen wir eine Sicherungskopie der mitgelieferten Konfigurationsdatei. | ||
| + | # cp / | ||
| + | |||
| + | Als nächstes passen wir die Dateirechte der Konfigurationsdatei an. | ||
| + | # chmod 640 / | ||
| + | |||
| + | Anschließend schenken wir unserem Apache- oder NGiNX-Systemuser das Webrootverzeichnis. | ||
| + | # chown apache.root / | ||
| + | bzw. | ||
| + | # chown nginx.root / | ||
| + | |||
| + | Nun bearbeiten wir die Konfigurationsdatei von **betterawstats** mit dem Editor unserer wahl, z.B. **vim**. | ||
| + | # vim / | ||
| + | |||
| + | <file php / | ||
| + | /** | ||
| + | * betterawstats - an alternative display for awstats data | ||
| + | | ||
| + | * @author | ||
| + | * @copyright | ||
| + | * @version | ||
| + | * @link | ||
| + | | ||
| + | * Based on the GPL AWStats Totals script by: | ||
| + | * Jeroen de Jong < | ||
| + | * copyright | ||
| + | * version 1.13 (http:// | ||
| + | | ||
| + | * This program is free software; you can redistribute it and/ | ||
| + | * modify it under the terms of the GNU General Public License | ||
| + | * as published by the Free Software Foundation; either version 2 | ||
| + | * of the License, or (at your option) any later version. | ||
| + | | ||
| + | * This program is distributed in the hope that it will be useful, | ||
| + | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| + | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| + | * GNU General Public License for more details. | ||
| + | | ||
| + | * You should have received a copy of the GNU General Public License | ||
| + | * along with this program; if not, write to the Free Software | ||
| + | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
| + | | ||
| + | |||
| + | // this file can't be used on its own - do not change these 3 lines | ||
| + | if (strpos ($_SERVER[' | ||
| + | die ('This file can not be used on its own!' | ||
| + | } | ||
| + | // ATTENTION: BetterAWstats has an online config editor that you can use | ||
| + | // instead of editing this file here. The link is on the bottom of the menu! | ||
| + | // To use it, set $BAW_CONF[' | ||
| + | // file is writable by the server, AND protectthe BetterAWStats installation | ||
| + | // by a .htaccess file! | ||
| + | |||
| + | // | ||
| + | //* SITE SETTINGS | ||
| + | // | ||
| + | |||
| + | // NAME: Script URL | ||
| + | // INFO: The url of BetterAWstats' | ||
| + | // Django : 2015-01-13 | ||
| + | // DEFAULT: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Script path | ||
| + | // INFO: The path of BetterAWstats, | ||
| + | // Django : 2015-01-13 | ||
| + | // DEFAULT: '/ | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Path to AWStats Data | ||
| + | // INFO: Set this value to the directory where AWStats saves its database | ||
| + | // files into. ATTENTION: If you read those files on windows but have | ||
| + | // them created on linux or the other way round, make sure you transfer | ||
| + | // them ' | ||
| + | // slash | ||
| + | // Django : 2015-01-13 | ||
| + | // DEFAULT: '/ | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Path to AWStats Libraries | ||
| + | // INFO: Set this value to the directory where AWStats saves its library | ||
| + | // files into. No trailing slash | ||
| + | // Django : 2015-01-13 | ||
| + | // DEFAULT: '/ | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Path to AWStats Language files | ||
| + | // INFO: Set this value to the directory where AWStats saves its language | ||
| + | // files into. No trailing slash | ||
| + | // Django : 2015-01-13 | ||
| + | // DEFAULT: '/ | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: URL to AWStats Icons | ||
| + | // INFO: The url to the awstats icons, should include the whole http:// | ||
| + | // no trailing slash. | ||
| + | // Django : 2015-01-13 | ||
| + | // DEFAULT: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Web Configuration | ||
| + | // INFO: Enable the online configuration editor? WARNING: Your config.php has | ||
| + | // to be writable in order to enable this. This is a BAD idea to use | ||
| + | // unless the folder is password-protected with a .htaccess file or | ||
| + | // similar. | ||
| + | // DEFAULT: true | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Change configuration password? | ||
| + | // INFO: This password is needed to access the online configuration. It has | ||
| + | // to be longer than 5 letters. | ||
| + | // Django : 2015-01-13 | ||
| + | // DEFAULT: '' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Limit to server? | ||
| + | // INFO: Set this to a simgle server that you want to limit or " | ||
| + | // show all. The server name should be the one used for awstats. | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | //* LAYOUT SETTINGS | ||
| + | // | ||
| + | |||
| + | // NAME: Layout Type | ||
| + | // INFO: Display page in vertical or horizontal layout? | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Language | ||
| + | // INFO: Set your language. Set to " | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | // ' | ||
| + | // ' | ||
| + | // ' | ||
| + | // Django : 2015-01-13 | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Decimal Point | ||
| + | // INFO: Decimal Point Character (99.9) | ||
| + | // DEFAULT: ' | ||
| + | // Django : 2015-01-13 | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Thousands separator | ||
| + | // INFO: Thousand Digit separator (1' | ||
| + | // DEFAULT: "'" | ||
| + | // Django : 2015-01-13 | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Date format (2007-31-12) | ||
| + | // INFO: How should a date look like? For formatting, please consult | ||
| + | // http:// | ||
| + | // DEFAULT: ' | ||
| + | // Django : 2015-01-13 | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Date & Time format (2007-31-12 23:59) | ||
| + | // INFO: How should a date & time look like? For formatting, | ||
| + | // http:// | ||
| + | // DEFAULT: 'Y-M-d H: | ||
| + | // Django : 2015-01-13 | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Percentage decimals | ||
| + | // INFO: How many decimals for percentage value? (99.9%) | ||
| + | // DEFAULT: ' | ||
| + | // Django : 2015-01-13 | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Hide Empty data | ||
| + | // INFO: Completely hide graphs with zero entries? (The menu will also be | ||
| + | // hidden) | ||
| + | // DEFAULT: true | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Submit dropdowns on change | ||
| + | // INFO: If enabled, the site/date dropdowns do not have an " | ||
| + | // page is refreshed as soon as you choose a new value. Not recommended | ||
| + | // for large sites. | ||
| + | // DEFAULT: true | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | //* TABLE SETTINGS | ||
| + | // | ||
| + | |||
| + | // NAME: First day of the week | ||
| + | // INFO: Should Sunday be the first day of the week or monday? | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | // Django : 2015-01-13 | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Field Length | ||
| + | // INFO: What is the max. text length of table fields? (Applies only to | ||
| + | // links) | ||
| + | // DEFAULT: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Max. Table Lines | ||
| + | // INFO: What is the max. no. of lines a table can have? Set to " | ||
| + | // disable. If a table reaches this number of lines, The rest is | ||
| + | // summarized into one line. This also applies to the "full list" view | ||
| + | // of a table | ||
| + | // DEFAULT: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | //* CHART SETTINGS | ||
| + | // | ||
| + | |||
| + | // NAME: Max scale for Visitors | ||
| + | // INFO: The maximum value of the chosen option will define the maximum | ||
| + | // height of the Visitors bars in the chart | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | // ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Max scale for Visits | ||
| + | // INFO: The maximum value of the chosen option will define the maximum | ||
| + | // height of the Visits bars in the chart | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Max scale for Pages | ||
| + | // INFO: The maximum value of the chosen option will define the maximum | ||
| + | // height of the Pages bars in the chart | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Max scale for Hits | ||
| + | // INFO: The maximum value of the chosen option will define the maximum | ||
| + | // height of the Hits bars in the chart | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Max no of chart rows | ||
| + | // INFO: When displaying the charts with the full lists, How many items can | ||
| + | // there be displayed? The rest will sum up into " | ||
| + | // to prevent too wide charts | ||
| + | // DEFAULT: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Chart Titles? | ||
| + | // INFO: If enabled, it will show a title on top of each chart. | ||
| + | // DEFAULT: true | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | //* JPGRAPH SETTINGS | ||
| + | // | ||
| + | |||
| + | // NAME: Enable JPgraph? | ||
| + | // INFO: To use JPGraph, you have to download it from | ||
| + | // http:// | ||
| + | // DEFAULT: false | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Path to JPGraph | ||
| + | // INFO: Where is your JPGraph installation? | ||
| + | // in. No trailing slash) | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | //* ADVANCED SETTINGS | ||
| + | // | ||
| + | |||
| + | // NAME: XHTML/ HTML | ||
| + | // INFO: Do you want output in HTML or XHTML? | ||
| + | // DEFAULT: true | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Debug | ||
| + | // INFO: Do you want to show debug-output (VERY detailed)? | ||
| + | // DEFAULT: true | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Parser Stats | ||
| + | // INFO: Do you want to show log file parsing data below the stats summary? | ||
| + | // DEFAULT: true | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Module settings | ||
| + | // INFO: Are you using BetterAWstats as a module for another software? | ||
| + | // (Currently only Drupal is supported) | ||
| + | // DEFAULT: ' | ||
| + | // POSSIBLE VALUES: ' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | //* DISPLAY | ||
| + | // | ||
| + | |||
| + | // NAME: Summary | ||
| + | // INFO: General Overview of key figures and dates | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Monthly history | ||
| + | // INFO: Monthly data | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Days of month | ||
| + | // INFO: Daily data | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Days of week (Averages) | ||
| + | // INFO: Weekdays | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Hours (Averages) | ||
| + | // INFO: Hours of the day | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Visitors domains/ | ||
| + | // INFO: Domains of visitors | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Hosts | ||
| + | // INFO: IP addresses of visitors | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Authenticated users | ||
| + | // INFO: Logins for username/ | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | // visit | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Robots/ | ||
| + | // INFO: Spiders, Robots of Search engines etc. | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Worms | ||
| + | // INFO: Worms searching for security holes | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Visits duration | ||
| + | // INFO: How long have people been on the site? | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: File type | ||
| + | // INFO: What filetypes are on the site | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Pages-URL | ||
| + | // INFO: Pages on the site | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Files/ | ||
| + | // INFO: Files/paths on the site | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Operating Systems | ||
| + | // INFO: Operating system of users | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Unknown OS (useragent field) | ||
| + | // INFO: Unknown Operating system | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Operating Systems (+Versions) | ||
| + | // INFO: Operating system of users including versions | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Browsers | ||
| + | // INFO: User Browser Type | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Browsers (+Versions) | ||
| + | // INFO: User Browser Type (+Versions) | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Unknown browsers (useragent field) | ||
| + | // INFO: Unknown Browsers | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Screen sizes | ||
| + | // INFO: Screensizes of users | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Referring search engines | ||
| + | // INFO: Referrals from search engines | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | // Django : 2015-01-13 | ||
| + | // default: true | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Referring sites | ||
| + | // INFO: Referrals from other sites | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Referring sites by Domains | ||
| + | // INFO: Referrals from other sites, grouped by 2-nd level domains | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Hotlinks | ||
| + | // INFO: Pages linking to images/data on your site | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Hotlinks by Domains | ||
| + | // INFO: Domains linking to images/data on your site | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: Search�Keyphrases | ||
| + | // INFO: Search phrases | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Search�Keywords | ||
| + | // INFO: Search words | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Miscellaneous | ||
| + | // INFO: User system features | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ); | ||
| + | |||
| + | // NAME: HTTP Status codes | ||
| + | // INFO: Acesses to pages that returned errors | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Error�Hits | ||
| + | // INFO: Required but not found URLs (HTTP code 404) | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | // NAME: Color depth | ||
| + | // INFO: Screen colors of users | ||
| + | $BAW_CONF_DIS[' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | ' | ||
| + | // ' | ||
| + | ' | ||
| + | // SORT_ASC=Ascending, | ||
| + | ); | ||
| + | |||
| + | |||
| + | ?> | ||
| + | </file> | ||
| + | |||
| + | ==== Apache vHosts ==== | ||
| + | Für den Zugriff auf unsere Webserver-Statistiken legen wir uns einen virtuellen Host an. Die entsprechende Konfigurationsdatei **vhosts.conf** haben wir im Verzeichnis **/etc/httpd/ | ||
| + | Mit dem Editor unserer Wahl ergänzen wir nun unsere virtuelen Hosts um einen weiteren: | ||
| + | # vim / | ||
| + | |||
| + | <file apache / | ||
| + | # betterawstats.nausch.org | ||
| + | # | ||
| + | < | ||
| + | ServerAdmin webmaster@nausch.org | ||
| + | ServerName betterawstats.nausch.org | ||
| + | ServerAlias www.betterawstats.nausch.org | ||
| + | ServerPath / | ||
| + | DocumentRoot "/ | ||
| + | |||
| + | < | ||
| + | AllowOverride None | ||
| + | #Options +ExecCGI | ||
| + | | ||
| + | | ||
| + | Deny from all | ||
| + | Allow from 127.0.0.1 | ||
| + | Allow from 10.0.0.0/ | ||
| + | Allow from 10.0.10.0/ | ||
| + | </ | ||
| + | |||
| + | Alias / | ||
| + | Alias /awstatscss "/ | ||
| + | Alias / | ||
| + | ScriptAlias /awstats/ "/ | ||
| + | |||
| + | ErrorLog logs/ | ||
| + | CustomLog logs/ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Haben wir die Konfigurationsdatei vervollständigt, | ||
| + | # apachectl -t | ||
| + | |||
| + | | ||
| + | |||
| + | Ein reload unseres Apache Webserver reicht nun aus, um den neunen vHOST verfügbar zu haben. | ||
| + | # systemctl reload httpd | ||
| + | |||
| + | ==== NGiNX vHost ==== | ||
| + | Wie auch schon bei der Installation und Konfiguration von [[centos: | ||
| + | |||
| + | Im Konfigurationsverzeichnis // | ||
| + | # vim / | ||
| + | |||
| + | <file httpd /etc/ | ||
| + | listen | ||
| + | server_name | ||
| + | access_log | ||
| + | error_log | ||
| + | |||
| + | root / | ||
| + | index index.php index.html; | ||
| + | |||
| + | | ||
| + | fastcgi_split_path_info ^(.+\.php)(/ | ||
| + | fastcgi_index index.php; | ||
| + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| + | include fastcgi_params; | ||
| + | } | ||
| + | |||
| + | location ~* ^/ | ||
| + | expires 1y; | ||
| + | root / | ||
| + | allow all; | ||
| + | } | ||
| + | |||
| + | location ~ icons { | ||
| + | allow all; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Die Konfigurationsdatei für **php-fpm**, | ||
| + | # vim / | ||
| + | <file httpd / | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | |||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | |||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | |||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | fastcgi_param | ||
| + | |||
| + | fastcgi_param X_SCRIPT_NAME | ||
| + | |||
| + | # PHP only, required if PHP was built with --enable-force-cgi-redirect | ||
| + | fastcgi_param | ||
| + | |||
| + | # Vhosts fastcgi config | ||
| + | fastcgi_pass | ||
| + | </ | ||
| + | |||
| + | ===== erstes Ergebnis ===== | ||
| + | Nach erfolgreicher Konfiguration steht dem ersten Aufruf nichts mehr im Wege. Der Aufruf erfolgt bei dem hier gezeigtem Konfigurationsbeispiel über folgende URL: | ||
| + | |||
| + | $ firefox http:// | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ==== Optimierung mit JpGraph ==== | ||
| + | Mit Hilfe der objektorientiereten Graphikbibliothek [[http:// | ||
| + | |||
| + | Hierzu laden wir uns von der [[http:// | ||
| + | # tar xzfv jpgraph-3.5.0b1.tar.gz -C / | ||
| + | |||
| + | Bevor wir uns nun an die Anpassung unserer Konfiguration machen, passen wir kurz noch die Verzeichnis und Dateirechte an. | ||
| + | # chown apache.apache / | ||
| + | |||
| + | Abschließend ergänzen wir noch die Konfigurationsdatei von BetterAWStats. | ||
| + | # vim / | ||
| + | |||
| + | <code php>... | ||
| + | |||
| + | // | ||
| + | //* JPGRAPH SETTINGS | ||
| + | // | ||
| + | |||
| + | // NAME: Enable JPgraph? | ||
| + | // INFO: To use JPGraph, you have to download it from | ||
| + | // http:// | ||
| + | // DEFAULT: true | ||
| + | // POSSIBLE VALUES: true, false | ||
| + | // Django : 2013-12-29 | ||
| + | // default: | ||
| + | // | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | // NAME: Path to JPGraph | ||
| + | // INFO: Where is your JPGraph installation? | ||
| + | // in. No trailing slash) | ||
| + | // DEFAULT: '/ | ||
| + | // Django : 2013-12-29 | ||
| + | // default: $BAW_CONF[' | ||
| + | $BAW_CONF[' | ||
| + | |||
| + | ... | ||
| + | </ | ||
| + | |||
| + | ===== Website Analytics mit Piwik ===== | ||
| + | |||
| + | Einen ganz anderen Ansatz, nämlich nicht das Auswerten der Serverlogs, sondern das Sammeln von Informationen über den Client, geht [[http:// | ||
| + | |||
| + | Eine ausführliche (Installations-)Beschreibung zu **Piwik** findet man [[centos: | ||
| + | |||
| + | ====== Links ====== | ||
| + | * **[[centos: | ||
| + | * **[[wiki: | ||
| + | * **[[http:// | ||
| - | </ | ||