Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local server monitoring #242

Open
maravento opened this issue Oct 10, 2023 · 4 comments
Open

local server monitoring #242

maravento opened this issue Oct 10, 2023 · 4 comments

Comments

@maravento
Copy link

maravento commented Oct 10, 2023

I would like to know what the configuration is to use this monitor on a local server. All the procedures I have read are for monitoring websites, but not local servers (localhost 127.0.0.1)
The objective is to monitor the local network. So, in case it can be done, please fix this installation and configuration procedure (or provide one for Ubuntu server 22.04):

apt install awstats

# configure
nano /etc/awstats/awstats.conf
replace:
LogFormat=4 with LogFormat=1
and
SiteDomain="" with SiteDomain="127.0.0.1" or SiteDomain="localhost" or SiteDomain="0.0.0.0" (???)

PD: unnecessary? `cp /etc/awstats/awstats.conf /etc/awstats/domain-example.conf`

# apache
nano etc/apache2/conf-available/awstats.conf
# create new
Alias /awstats-icon/ /usr/share/awstats/icon/
Alias /awstatsclasses/ /usr/share/java/awstats/

<Directory /usr/share/awstats>
    Options FollowSymLinks
    AllowOverride None
    # access permission for your local network
    Require ip 127.0.0.1
</Directory>

# activate and restart
a2enconf awstats
a2enmod cgid
systemctl restart apache2

# generate reports ( reports are updated for hourly by Cron )
*/10 * * * * www-data [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh
# Generate static reports:
10 03 * * * www-data [ -x /usr/share/awstats/tools/buildstatic.sh ] && /usr/share/awstats/tools/buildstatic.sh

# access (?):
https://localhost/awstats/awstats.pl

thk

@chuckhoupt
Copy link
Contributor

The SiteDomain directive should be set to the hostname you typically use to access the site. So if you typically browse via http://localhost, then set SiteDomain="localhost". Note that the SiteDomain Doc say it is only used if you also activate ShowLinksOnUrl (for single site logs).

@maravento
Copy link
Author

by default:

# Each URL, shown in stats report views, are links you can click.
# Possible values: 0 or 1
# Default: 1
#
ShowLinksOnUrl=1

Please review the procedure described above and confirm if it is correct, since there is no access, I don't know which port I should use with localhost, the url https://localhost/awstats/awstats.pl does not work, etc etc

what about: cp /etc/awstats/awstats.conf /etc/awstats/domain-example.conf (it is necessary?)

@chuckhoupt
Copy link
Contributor

I don't know which port I should use with localhost, the url https://localhost/awstats/awstats.pl does not work

Possibly there is confusion here. For a localhost web-server you'd usually use port 80. This means you'd use http not https (note s), i.e. http://localhost. If you're running the website on a different port, you can add it to the url, e.g. http://localhost:8080.

@maravento
Copy link
Author

maravento commented Oct 11, 2023

Please, I would appreciate it if, in order not to waste time, you describe yourself, in your own words, the installation and configuration procedure, step by step, for localhost (not website) ubuntu (22.04)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants