Giter Site home page Giter Site logo

awstats's Introduction

Awstats

This is a simple way to analysis the apache (webserver) log in a full graphic web page.

Awstats and postfix / zimbra

This is a simple way to analysis the postfix / zimbra log in a full graphic web page.

Config

Install docker in your awstat host server.

Step 1

Create a copy of "awstats.linoxide.conf". We have taken "example.com" as domain.

cp -av awstats.linoxide.conf awstats.example.com.conf

Step 2

Change the following details according to the need in "awstats.example.com.conf".

#LogFile="/example.com.access.log"
LogFile="/var/log/apache2/example.com.access.log"
SiteDomain="example.com"
HostAliases="example.com www.example.com"

Step 3

Change the following details according to the need in "mycron".

Replace :

01 *  * * * /usr/lib/cgi-bin/awstats.pl -config=nroer -update


With :

01 *  * * * /usr/lib/cgi-bin/awstats.pl -config=example.com -update

Step 4

Change the following details according to the need in "docker-compose.yml".

Change dir name and file name as domain name also change access log name and uncomment it:

#    - /logs/example.com/access.log:/root/example.com/access.log			# Change domain name as dir name and access log name
#    - ./awstats.example.com.conf:/usr/lib/cgi-bin/awstats/awstats.example.com.conf	# Change domain name as file name in conf

Run with your own config

Build your image incase you have changed Dockerfile:

bash build-docker-image.sh

Start container with run command

If your log is saved in the path: /var/log/mail.log, and you can mount this file to the awstats server for analysis use.

docker run -d --name awstats --hostname ServerName \
  -v /var/log/mail.log:/var/log/mail.log \
  -v /path/to/your.conf:/usr/lib/cgi-bin/awstats/awstats.linoxide.conf && \
  -p 8080:80 mrunal/awstats:7.6

In this command, you will also run your server into host port 8080.

Start container with docker-compose command

The docker-compose.yml is a file example to run container with docker-compose up

Browse

http://your-awstats-ip-addr:8080/cgi-bin/awstats/awstats.pl?config=linoxide

References

https://github.com/linkerlab/awstats                - For basic awstats installation and configuration
https://github.com/marcelofmatos/awstats_postfix    - For docker-compose.yml file

Thanks to linkerlab

awstats's People

Contributors

mrunal4 avatar peihsinsu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.