More articles:
2017   2018   2019   2020   2021
2022   2023   2024   

2019-09-26 00:00:00

Technologyanalytics|apache|Awstats|server|statistics|virtualhost|website|Wordpress

How to configure Awstats web statistics for multiple sites managed by one Apache server

Awstats is a web traffic analytics software package that collects statistical data about visitors of a web site. It inserts data into a database so that it is easy to view historical statistics and compare it to today's numbers. A web server, such as Apache, continuously writes log files that Awstats reads and where it extracts the data.

Awstats can analyze web, email, and ftp server data. Statistics for the number of visitors, most visited pages, referrers, search engines, browser apps, keywords, and other information is displayed on a dashboard.

Our earlier article explains how to install and configure Awstats for a web site, such as Wordpress, Drupal or for another site, but now, I will guide you through the process of configuring Awstats for a server that runs multiple web sites. A quite typical setup for a web server powered by Apache is to configure it to manage multiple web sites. Apache calls them virtual hosts. If you want to separate statistics for each virtual host, Awstats can do it, but it requires a little bit of configuration.

Assuming you already have Awstats running and generating statistics for a web site, here are the steps you have to take to make it work for multiple virtual hosts.

The guide has been tested on Debian 8 (Jessie) and Debian 10 (Buster) with Apache 2.4.

Let's say you have two sites: myblog.com and anothersite.net.

Open the Apache virtual host configuration file/etc/apache2/sites-available/myblog.conf
(myblog is your conf file name, often it is the same as the domain name) and modify the log entry:
CustomLog ${APACHE_LOG_DIR}/access.log combined
into:
CustomLog ${APACHE_LOG_DIR}/access-myblog.log combined

Do the same for the anothersite.net Apache virtual host file. Create a unique log file name so that Awstats can separate each web site's data.

Make a copy of the Awstats configuration file for each site:
cp /etc/awstats/awstats.conf /etc/awstats/awstats.myblog.com.conf
cp /etc/awstats/awstats.conf /etc/awstats/awstats.anothersite.net.conf

(replace myblog.com and anothersite.net with your actual domain names)

Edit the fileawstats.myblog.com.conf as follows (these are the default values that usually work):

LogFile="/var/log/apache2/access-myblog.log"
LogFormat=1
SiteDomain="myblog.com"
HostAliases="www.myblog.com myblog.com"
DNSLookup=0
AllowFullYearView=3
LoadPlugin="tooltips"
LoadPlugin="geoipfree"
(you may have to install additional software for this to work - it shows country names instead of numbers)

Editawstats.anothersite.net.conf as well, making sure that the log file name and domain name reflect this particular site.

That's it for setting up Awstats so that it can collect statistics for multiple virtual hosts managed by one Apache server. All the other configuration settings for each site, such as access rights must be tweaked as explained in the guide that explains the steps required for configuring Awstats for a single web site.

Ancient architecture featuring cables for modern life

2026-03-10 17:33:48

Ancient architecture featuring cables for modern life


News

2026-03-08 15:48:00

A perfectly reasonable question for a traveler to ask is: now, where are the countries that are safe to visit? Here is a ranking for the countries that are stable without serious conflicts that could threaten residents or tourists. #travel #safety .https://klaava.com/where-are-the-safest-countries-in-the-world/


Cafeteria.

2026-03-06 17:21:27

arihak

Cafeteria.


News

2026-02-24 17:17:00

In 2025, the world traveled more than the year before pandemic. Which regions did tourists visit? #travel .https://klaava.com/where-did-the-world-travel-in-2025-and-which-regions-lost-or-gained-visitors/


Traffic jam on a road in the fruit farm district.

2026-02-21 17:50:44

arihak

Traffic jam on a road in the fruit farm district.


News

2026-02-08 15:26:00

As a whole, it was a delightful trip to the visitor-friendly city. Here are the highlights of the Montpellier city center. #travel #Europe #Francehttps://klaava.com/city-break-in-the-pretty-and-friendly-montpellier-in-southern-france/


News

2026-01-27 15:27:00

Judged anonymously by an international panel, the 2025 TPOTY shortlist was selected from more than 20,000 entries across 160 countries, making this one of the most competitive #travel #photography competitions in the world.https://www.digitalcameraworld.com/photography/awards-and-competitions/the-worlds-best-travel-photographs-are-crowned-and-the-winning-images-are-simply-stunning


News

2026-01-22 17:33:00

A survey revealed the level of trust people have in their fellow citizens in 90 countries across the world. Here is the top 50 countries where people trust in other people the most. #travel #safety .https://klaava.com/when-traveling-do-you-trust-people-overseas-here-is-how-much-locals-across-the-world-trust-their-fellow-citizens/


Evening in the historic center of Montpellier.

2026-01-21 16:00:50

arihak

Evening in the historic center of Montpellier.


News

2026-01-08 15:26:00

While residents’ concern about masstourism in some countries in #Europe is real, where do Europeans themselves #travel when they want to enjoy a week-long break? .https://klaava.com/where-europeans-like-to-travel-for-one-week-holiday-in-the-eu-region/


Statues guarding a castle in Copenhagen.

2026-01-07 17:08:46

Statues guarding a castle in Copenhagen.


Wide open Atlantic Ocean

2026-01-04 12:50:32

arihak

Wide open Atlantic Ocean


News

2025-12-26 14:41:00

If we look at the millions of tourists who will travel somewhere they haven’t visited before, we can discover trends that are gradually changing how and where we travel. Here is our take on #travel #trends for #2026 .https://klaava.com/travel-trends-2026-road-trips-calm-and-quiet-ai-assistants-and-popular-culture/


Just in case you forgot to bring your own #book to the port

2025-12-24 17:12:21

arihak

Just in case you forgot to bring your own#book to the port


News

2025-12-24 08:24:00

I downloaded a #phone app with a “zero-processing” feature that claimed to take photos without any software alterations. When comparing the photos my phone #camera takes automatically to the photos taken with this app, the results were shocking. #photography .https://www.theguardian.com/commentisfree/2025/dec/23/smartphones-photos-filters-pictures-software


News

2025-12-16 08:59:00

9 professional #cyclists produced enough power on pedals for an ultralight airplane to take off in Mallorca.https://elpais.com/deportes/ciclismo/2025-12-15/las-alas-de-red-bull-como-nueve-ciclistas-despegan-un-ultraligero-con-sus-pedales.html


News

2025-12-11 16:33:00

Person of the Year focuses world’s attention on the people that shape our lives, TIME editor-in-chief Sam Jacobs wrote. “this year, no one had a greater impact than the individuals who imagined, designed, and built #AI.”--- ok, but is the Editor a person or AI?https://www.euronews.com/culture/2025/12/11/time-person-of-the-year-2025-announced-the-architects-of-ai


News

2025-12-10 08:31:00

Here is the index for the top 30 cities in the world for moving around on a #bicycle. #travel .https://klaava.com/if-you-like-to-explore-cities-you-visit-by-bicycle-here-are-the-best-destinations/


Nice quiet morning, but do scooter manufacturers know about electric vehicles?

2025-12-04 17:49:27

arihak

Nice quiet morning, but do scooter manufacturers know about electric vehicles?


News

2025-12-04 16:40:00

Data from the world's leading hotel groups, travel firms and trend forecasters suggests that 2026 will be the year of quiet escapes, algorithm-shaped itineraries, ultra-personalised retreats and a return to slower, more intentional #travel.https://www.bbc.com/travel/article/20251201-seven-travel-trends-that-will-define-2026


More articles:
2017   2018   2019   2020   2021
2022   2023   2024