![]() If AWStats needs to be accessed externally from a specific network, the IP address of the network needs to be allowed in the AWStats configuration file.įor this, open the AWStats configuration file using any editor: # vi /etc/httpd/conf.d/nfĪdd in the network IP (example: 123.123.123.123) using Allow from directive as per below. This default configuration is useful except in cases of allowing from access. Start to configure Apache for AWStats, the default AWStats configuration file is located at the path /etc/httpd/conf.d/nf. To install AWStats which the server already has Apache webserver installed in it, execute the below command to install AWStats and all required dependencies using YUM. The below command can be executed in order to install the EPEL repository on the server. The below steps can be followed to install and configure AWStats in a CentOS/Fedora server, which already has an Apache webserver running in it. This guide outlines the basic steps involved in the installation of AWStats in a Linux server (provided Apache service is already installed in the server). This can easily be installed on a Linux-based server. AWStats produces outputs in the form of an easily readable graphical format. Wherever that file may be in your setup, open it and add this line somewhere in the server block.AWStats (Advanced Web Statistics) is a freely available analytics tool that is used to generate web/FTP/mail statistics by analyzing the available logs in a server. For example this site is served by the file /etc/nginx/sites-enabled/. If you follow the standard nginx practice, your config file should be in /etc/nginx/sites-enabled/. Now we need to edit our individual nginx config file to use this log format. '"$http_user_agent" "$http_x_forwarded_for"' '$status $body_bytes_sent "$http_referer" ' Open up /etc/nginx/nf and add these lines: log_format main '$remote_addr - $remote_user "$request" ' If you don’t customize your Nginx log format then you can skip this section, but make a note of where Nginx is putting your logs, you’ll need that in the next step. To get AWStats working the next step is to create our config files and build the stats, but first I like to overcomplicate things with a custom log format for Nginx. You can double-check that the database files exist by looking in the directory /usr/share/GeoIP/ and verifying that there’s a file named GeoIP.dat. That should take care of the GeoIP stuff. Once cpan is set up, install GeoIP: install Geo::IP If you’ve already got cpan set up, you can skip to the next step: make install If this is your first time in cpan you’ll need to run two commands to get everything set up. Next you need to fire up the cpan shell: cpan Here’s what worked for me.įirst we need build-essential and libgeoip: sudo apt install libgeoip-dev build-essential Because I like to have some geodata in my stats, I also installed the tools necessary to use the AWStats geoip plugin. This will install the various tools and scripts AWStats needs. The first step is to install the AWStats package from the Ubuntu repositories: sudo apt install awstats Here’s how I’ve managed to get AWStats installed and running on Ubuntu 18.04, Ubuntu 20.04, Debian 10, and Debian 11. ![]() ![]() AWStats just analyzes your visitors’ footprints. There’s no spying, no third-party code bloat. It parses your server log files and tells you who came by and what they did. If you’d like some basic data about your site’s visitors, but don’t want to let spyware vendors track them around the web, AWStats makes a good solution. I’ve updated the guide so that the commands work on both Debian 11 and Ubuntu 20.04. Update Sept 2021: I still use this method and it still works.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |