howtos:install_awstats_apache_debian_12
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | howtos:install_awstats_apache_debian_12 [2023/11/17 10:46] (current) – created thum | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How to install AWStats with Apache on Debian 12/Bookworm ====== | ||
+ | ===== Install AWStats ===== | ||
+ | |||
+ | Run the following command: | ||
+ | |||
+ | apt install awstats | ||
+ | |||
+ | This will start the installation process, resolve dependencies and install the required packages for you. | ||
+ | |||
+ | |||
+ | //Optional: In order to get GeoIP information you can install the following Perl packages:// | ||
+ | |||
+ | apt install libgeo-ip-perl libgeo-ipfree-perl | ||
+ | |||
+ | ===== Configure AWStats ===== | ||
+ | |||
+ | Once the installation routine is completed, edit the file awstats.conf as follows: | ||
+ | |||
+ | LogFile="/ | ||
+ | LogFormat=1 | ||
+ | SiteDomain=" | ||
+ | HostAliases=”www.your-domain.com your-domain.com” | ||
+ | DNSLookup=0 | ||
+ | AllowFullYearView=3 | ||
+ | LoadPlugin=" | ||
+ | |||
+ | ===== Configure Apache for AWStats ===== | ||
+ | |||
+ | Edit the Apache configuration file / | ||
+ | |||
+ | vi / | ||
+ | |||
+ | Paste the following content | ||
+ | |||
+ | Alias / | ||
+ | Alias / | ||
+ | Alias /awstatscss "/ | ||
+ | ScriptAlias /awstats/ / | ||
+ | Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | ||
+ | |||
+ | Save and exit the configuration file. | ||
+ | |||
+ | To enable this configuration run | ||
+ | |||
+ | ln -s / | ||
+ | |||
+ | Enable the " | ||
+ | |||
+ | / | ||
+ | |||
+ | Implement the changes by restarting Apache | ||
+ | |||
+ | systemctl restart apache2 | ||
+ | |||
+ | |||
+ | You can see how the installation is progressing by pointing your web browser to: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | The top line should display the time when statistics were updated. It probably reads 'Never updated' | ||
+ | |||
+ | / | ||
+ | |||
+ | Now you should get some output like | ||
+ | |||
+ | Create/ | ||
+ | From data in log file "/ | ||
+ | Phase 1 : First bypass old records, searching new record... | ||
+ | Searching new records from beginning of log file... | ||
+ | Phase 2 : Now process new records (Flush history on disk after 20000 hosts)... | ||
+ | Jumped lines in file: 0 | ||
+ | Parsed lines in file: X | ||
+ | Found 0 dropped records, | ||
+ | Found 0 comments, | ||
+ | Found 0 blank records, | ||
+ | Found 0 corrupted records, | ||
+ | Found 0 old records, | ||
+ | Found X new qualified records. | ||
+ | |||
+ | ===== Secure Your AWStats via .htaccess ===== | ||
+ | |||
+ | A basic, simple way of restricting access is to set up a http password. Open your apache2 configuration file | ||
+ | |||
+ | vi / | ||
+ | |||
+ | Paste the content as shown below: | ||
+ | |||
+ | < | ||
+ | < | ||
+ | Options +ExecCGI | ||
+ | AddHandler cgi-script .cgi | ||
+ | AuthType Basic | ||
+ | AuthName ' | ||
+ | AuthUserFile '/ | ||
+ | Require valid-user | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | If you don’t | ||
+ | |||
+ | htpasswd -cb / |
howtos/install_awstats_apache_debian_12.txt · Last modified: 2023/11/17 10:46 by thum