CustomLog /var/www/vhosts/example.com/statistics/logs/access_log common

Similar documents
Genesys Interaction Recording Solution Guide. WebDAV Requirements

DxR clinician INSTRUCTOR MANUAL STUDENT USER MANUAL TECHNICAL APPENDIX

VMware Monitoring Using Unnoc - Setup Instructions

Tungsten Dashboard for Clustering. Eric M. Stone, COO

IPv6 Sauron - Quick How To

Twiki Installation Notes. Ned Brush 4/13/06. Everything is left as is (default settings) unless specified below. Distribution: RHEL 4

RTC 502 and its Git adapter, Git and its prerequisite

LAMP Stack with VirtualHosts On Centos 6.x

AWStats logfile analyzer Documentation

app = web.application(urls, globals()) class hello: def GET(self, name): if not name: name = 'World' return 'Hello, ' + name + '!' if name == " main "

How To Configure Web Access To Subversion Repositories Using Apache

Table of contents. AWStats logfile analyzer 6.95 Documentation. Enter your search terms Submit search form

Apache + PHP + MySQL. bdnog November 2017 Dhaka, Bangladesh

.htaccess. What is it and what can it do?

Table of contents. AWStats logfile analyzer 7.3 Documentation. Release Notes What is AWStats / Features New Features / Changelog Upgrade

ViMP 2.0. Installation Guide. Verfasser: ViMP GmbH

A PAtCHy server: developed by the Apache group formed 2/95 around by a number of people who provided patch files for NCSA httpd 1.3 by Rob McCool.

Certification. The HTTP Service

Setting Up PHPlist (Open-Source Newsletter Manager)

Integration of VT ETD-db with Banner

Observium Enable your new virtual host 4

[UNIT 1 <Continued>]: <Understanding Apache>

Install WordPress 3.X In Multi Blog / Multi user mode On localhost

QGIS Application - Bug report #16462 QGIS Server lost the ability to cascade WMS layers published using HTTPS

SciELO Web site for Windows Documentation

DxR clinician INSTRUCTOR MANUAL STUDENT USER MANUAL TECHNICAL APPENDIX

User authentication, passwords

SETTING UP 3 WORDPRESS SITES ON APACHE AND UBUNTU BY RAMI

System Administration. NFS & Web Servers

VCP-DCV5, OCP (DBA), MCSA, SUSE CLA, RHCSA-7]

Web Servers and Security

Configure Wildcard-Based Subdomains

mod_wsgi Documentation

GMU Specifications And Installation Procedures Page 1 04/04/08. JBM Gateway Management Utility Server Specifications And Installation Procedures

CTEC1863/2017F Lab #11, Part 1 Page 1 of 11. In this lab, we will be installing a popular solution for database-driven web sites.

Interested in learning more about security? Network Monitoring with Nagios. Copyright SANS Institute Author Retains Full Rights

Architecture. Steven M. Bellovin October 27,

Setting up the Apache Web Server


Interested in learning more? Global Information Assurance Certification Paper. Copyright SANS Institute Author Retains Full Rights

Apache MySQL PHP PHPAdmin Install

PoWA Documentation. Release Dalibo

Sams Teach Yourself Apache 2 in 24 Hours

Jarvis Web Gateway. Installation Instructions. Jonathan Couper-Smartt

Obtaining and Installing the Updated TSBroadcaster Scripts

MODEM on HP-UX. Guy Van Sanden.

Interested in learning more about cyber security training? Network Monitoring with Nagios. Copyright SANS Institute Author Retains Full Rights

CSN09101 Networked Services. Module Leader: Dr Gordon Russell Lecturers: G. Russell

Linux Network Administration. Apache Web Server COMP1071 Summer 2017

Koha 3 on Centos. We are installing Koha on the newly installed CentOS machine. Open a terminal and log in as root.

Adapting AWStats for IBM WebSphere Portal 6.0.x and virtual portals

ARCHER Data Services Service Layer

Domain Statistics Collector Tutorial

EX200 - EX200 Red Hat Certified System Administrator (RHCSA) Exam

EX200 EX200. Red Hat Certified System Administrator RHCSA

RSA NetWitness Logs. Apache HTTP Server. Event Source Log Configuration Guide. Last Modified: Friday, November 3, 2017

The WebGUI Runtime Environment. Roy Johnson Plain Black Corporation

Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess. 31 st Oct - 4 th Nov Blantyre, Malawi. Dorcas Muthoni.

EX200 Q&A. DEMO Version

Servers for Hackers. Server Administration for Programmers. Chris Fidao. This book is for sale at

K-RATE INSTALLATION MANUAL

Exam Questions EX200

example.com index.html # vim /etc/httpd/conf/httpd.conf NameVirtualHost :80 <VirtualHost :80> DocumentRoot /var/www/html/

Below are the steps to install Orangescrum Self Hosted version of Cloud Edition in Ubuntu Server Last Updated: OCT 18, 2018

This guide consists of the following two chapters and an appendix. Chapter 1 Installing ETERNUSmgr This chapter describes how to install ETERNUSmgr.

EX200 Exam Questions Demo Red Hat. Exam Questions EX200

Read Source Code the HTML Way

Services: Apache Distributed configuration & Access control

Your Apache ssl.conf in /etc/httpd.conf.d directory has the following SSLCertificate related directives.

Architecture. Steven M. Bellovin October 31,

Linux-Kurs Themen - Apache in One week - 1 May Apache in One week

Red Hat.Actualtests.EX200.v by.Dixon.22q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator (RHCSA) Exam

شرکت توسعه ارتباطات پردیس پارس. owncloud. The last file sharing platform you'll ever need

Using.htaccess to Restrict OU Directory by Usernames and Passwords in an.htpasswd File

NX Server Manager Installation and Configuration Guide

Managing Xen With Xen-Tools, Xen-Shell, And Argo

Install latest version of Roundcube (Webmail) on CentOS 7

1 Apache2::Directive - Perl API for manipulating the Apache configuration tree

EX200.Lead2pass.Exam.24q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator RHCSA. Version 14.0

Deltek Maconomy. Installation Guide For Standard and PSO Installations

Public-Key Infrastructure (PKI) Lab

Braindumps EX200 15q

Securing Apache: Step-by-Step by Artur Maj last updated May 14, 2003

How To Jailbreak A PogoPlug Step One: Get Access Step Two: Set Up Your Flash Drive Step 3: Download and install Arch Linux ARM...

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

Apache Web Server Administration for Windows

Seltestengine EX200 24q

Deltek Maconomy. Installation Guide For Standard and PSO Installations

Chef. Saving Time (and Money) With Automated Provisioning Trotter Cashion Hoopla Software

Omeka Collection Viewer. Configuration. Version 3 3/16/2016 Shaun Marsh

Manually Password Protect Directories Apache Ubuntu

Install some base packages. I recommend following this guide as root on a new VPS or using sudo su, it will make running setup just a touch easier.

Bitnami Subversion for Huawei Enterprise Cloud

Bitnami Ruby for Huawei Enterprise Cloud

D x R. nursing INSTRUCTOR MANUAL STUDENT MANUAL TECHNICAL APPENDIX

CentOS 7 with MariaDB

GestióIP IPAM. v3.2. Installation Guide. v0.12. IP address management software.

Web Servers and Security

SIM Bank Scheduler Server User Manual. (for Version )

FUJITSU Cloud Service S5 Installation and Configuration of MySQL on a CentOS VM

Transcription:

All steps as root, unless mentioned otherwise. First of all, configure your Apache server to use combined, instead of common as log format, in /etc/httpd/conf/httpd.conf. In Section 1: CustomLog logs/access_log combined In each virtual host:- ErrorLog /var/www/vhosts/example.com/statistics/logs/error_log CustomLog /var/www/vhosts/example.com/statistics/logs/access_log common Download awstats in /root/ from: http://awstats.sourceforge.net/ 1 / 16

mkdir /usr/local/awstats Put all files from the package over there. cd /usr/local/awstats tar xzf /root/awstats-6.9.tar.gz Make configuration directory for awstats. mkdir /etc/awstats In case you have old configuration files, just copy them over as :- cp /data/backup/etc/awstats/awstats.* /etc/awstats/ 2 / 16

Or, create new ones as following. Remember to use the naming scheme as awstats.sitename.conf :- The important lines are highlighted. [root@www root]# vi /etc/awstats/awstats.www.example.com.conf LogFile="/var/www/vhosts/example.com/statistics/logs/access_log" LogType=W LogFormat=4 LogSeparator=" " SiteDomain="www.example.com" HostAliases="example.com www.example.com 127.0.0.1 localhost" DNSLookup=1 3 / 16

DirData="/var/lib/awstats" DirCgi="/cgi-bin" DirIcons="/icon" AllowToUpdateStatsFromBrowser=0 AllowFullYearView=2 EnableLockForUpdate=0 DNSStaticCacheFile="dnscache.txt" DNSLastUpdateCacheFile="dnscachelastupdate.txt" SkipDNSLookupFor="" AllowAccessFromWebToAuthenticatedUsersOnly=0 AllowAccessFromWebToFollowingAuthenticatedUsers="" 4 / 16

AllowAccessFromWebToFollowingIPAddresses="" CreateDirDataIfNotExists=0 BuildHistoryFormat=text BuildReportFormat=html SaveDatabaseFilesWithPermissionsForEveryone=0 PurgeLogFile=0 ArchiveLogRecords=0 KeepBackupOfHistoricFiles=0 DefaultFile="index.html" SkipHosts="" SkipUserAgents="" SkipFiles="" 5 / 16

SkipReferrersBlackList="" OnlyHosts="" OnlyUserAgents="" OnlyFiles="" NotPageList="css js class gif jpg jpeg png bmp ico swf" ValidHTTPCodes="200 304" ValidSMTPCodes="1 250" AuthenticatedUsersNotCaseSensitive=0 URLNotCaseSensitive=0 URLWithAnchor=0 URLQuerySeparators="?;" 6 / 16

URLWithQuery=0 URLWithQueryWithOnlyFollowingParameters="" URLWithQueryWithoutFollowingParameters="" URLReferrerWithQuery=0 WarningMessages=1 ErrorMessages="" DebugMessages=0 NbOfLinesForCorruptedLog=50 WrapperScript="" DecodeUA=0 MiscTrackerUrl="/js/awstats_misc_tracker.js" UseFramesWhenCGI=1 7 / 16

DetailedReportsOnNewWindows=1 Check the directory:- [root@www awstats-6.9]# ls /etc/awstats/ -l -rw-r--r-- 1 root root 59622 Jul 29 12:21 awstats.www.example.com.conf [root@www awstats-6.9]# The Data directory is /var/lib/awstats mkdir /var/lib/awstats 8 / 16

Optional : If you have old data, you can copy it to the /var/lib/awstats at this point. cp /data/backup/var/lib/awstats/* /var/lib/awstats/ Add the highlighted code to your apache virtual hosts configuration: <VirtualHost *:80> ServerName www.example.com ServerAlias example.com DocumentRoot /var/www/html/default <Directory /var/www/html/default> Order Allow,Deny 9 / 16

AllowOverride none Allow from all Options None </Directory> ErrorLog /var/www/vhosts/example.com/statistics/logs/error_log CustomLog /var/www/vhosts/example.com/statistics/logs/access_log common Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/" Alias /awstatscss "/usr/local/awstats/wwwroot/css/" Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/" ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/" 10 / 16

# # This is to permit URL access to scripts/files in AWStats directory. # <Directory "/usr/local/awstats/wwwroot"> Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> 11 / 16

Create records from the log file for the first time. (This is a very slow process. 4500 lines per second + DNS overhead, on a 1 GHz system). Will take an hour sometimes:- [root@www root]# perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.example.com -update Create/Update database for config "/etc/awstats/awstats.www.example.com.conf" by AWStats version 6.9 (build 1.925) From data in log file "/var/www/vhosts/example.com/statistics/logs/access_log"... Phase 1 : First bypass old records, searching new record... Direct access to last remembered record has fallen on another record. So 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: 4460803 12 / 16

Found 10 dropped records, Found 399 corrupted records, Found 4096243 old records, Found 364151 new qualified records. [root@www root]# Put the following in crontab to run everymorniing at 4 AM. Use multiple entries for each site you are monitoring with awstats. crontab -e 0 4 * * * /usr/bin/perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.example.com -update 13 / 16

That is it. Access your stats page using : http://www.example.com/awstats/awstats.pl Making your stats in-accessible to public:- Create a.htaccess file in the wwwroot/cgi-bin directory: vi.htaccess AuthName "Authorization Required" AuthType Basic AuthUserFile /var/www/vhosts/.htpasswd Require valid-user Create users such as:- 14 / 16

[root@www cgi-bin]# htpasswd -c /var/www/vhosts/.htpasswd example.com New password: Re-type new password: Change ownership of the.htaccess and.htpasswd files to make them readable by apache: chown apache:apache.htaccess /var/www/vhosts/.htpasswd For this to work, you will need to update the corresponding AllowOverride directive in your apache config file, From: AllowOverride None To : AllowOverride AuthConfig Or: 15 / 16

AllowOverride All Then restart or reload Apache service: service httpd reload That should be all. 16 / 16