Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

awstats, how to see in a browser?

56 views
Skip to first unread message

Gene Heskett

unread,
Feb 16, 2021, 4:30:04 AM2/16/21
to
Greetings all;

I finally got around to changing awstats.conf to look at the httpd logs
since the apache2 logs haven't been used in a while, but 2 changes in
browsers has lost the localhost link to see what it is spitting out.

Does anyone recall the address to send a browser to?

Thanks.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

mick crane

unread,
Feb 16, 2021, 11:10:05 AM2/16/21
to
On 2021-02-16 09:28, Gene Heskett wrote:
> Greetings all;
>
> I finally got around to changing awstats.conf to look at the httpd logs
> since the apache2 logs haven't been used in a while, but 2 changes in
> browsers has lost the localhost link to see what it is spitting out.
>
> Does anyone recall the address to send a browser to?

nmap to see what port is listening on ?

mick

--
Key ID 4BFEBB31

Thomas Pircher

unread,
Feb 16, 2021, 4:10:05 PM2/16/21
to
Gene Heskett wrote:
>I finally got around to changing awstats.conf to look at the httpd logs
>since the apache2 logs haven't been used in a while, but 2 changes in
>browsers has lost the localhost link to see what it is spitting out.
>
>Does anyone recall the address to send a browser to?

awstats does not start a web server. You can use it in 2 modes,
depending on your configuration:
- as a CGI script
- as an offline HTML generator

In either case you need a web server to serve the HTML to your browser.
Your best chance is to check your server configuration (I'd start with
/etc/apache2/conf-available/awstats.conf if you are using Apache) for
the URL.

The installation process is described in
/usr/share/doc/awstats/README.Debian.gz so if you have followed those
instructions, then the path in the URL would be /cgi-bin/awstats.pl

If your web server is running, then you should at least see the process
in the output of
# ss -nlpt

Thomas

Gene Heskett

unread,
Feb 16, 2021, 7:30:04 PM2/16/21
to
On Tuesday 16 February 2021 15:54:12 Thomas Pircher wrote:

> Gene Heskett wrote:
> >I finally got around to changing awstats.conf to look at the httpd
> > logs since the apache2 logs haven't been used in a while, but 2
> > changes in browsers has lost the localhost link to see what it is
> > spitting out.
> >
> >Does anyone recall the address to send a browser to?
>
> awstats does not start a web server. You can use it in 2 modes,
> depending on your configuration:
> - as a CGI script
> - as an offline HTML generator
>
> In either case you need a web server to serve the HTML to your
> browser. Your best chance is to check your server configuration (I'd
> start with /etc/apache2/conf-available/awstats.conf if you are using
> Apache) for the URL.
>
Apache2 is running, you can see it at the link in the sig.

> The installation process is described in
> /usr/share/doc/awstats/README.Debian.gz so if you have followed those
> instructions, then the path in the URL would be /cgi-bin/awstats.pl
>
apt/synaptic installed so I assume you mean /var/www etc
ene@coyote:/var/www/cgi-bin$ ls -R
.:
add_annotation.pl dansguardian.pl gitweb inclist.pl lsetlist.pl
sel_to_add.pl text4sel.pl upsset.cgi upsstats-single.html
view_lset.pl
cvsweb.cgi dhcpstatus.cgi gitweb.cgi ipcalc.pl
same_in_otherrun.pl test.cgi upsimage.cgi upsstats.cgi
view_annotations.pl

./gitweb:

> If your web server is running, then you should at least see the
> process in the output of

ss -nlpt
A new to me command but:
ss -nlpt:
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 5 0.0.0.0:631 0.0.0.0:*
LISTEN 0 128 0.0.0.0:443 0.0.0.0:*
LISTEN 0 32 0.0.0.0:7741 0.0.0.0:*
LISTEN 0 64 0.0.0.0:10080 0.0.0.0:*
LISTEN 0 128 0.0.0.0:6309 0.0.0.0:*
LISTEN 0 16 127.0.0.1:3493 0.0.0.0:*
LISTEN 0 128 0.0.0.0:3142 0.0.0.0:*
LISTEN 0 64 0.0.0.0:6566 0.0.0.0:*
LISTEN 0 5 0.0.0.0:19150 0.0.0.0:*
LISTEN 0 128 127.0.0.1:783 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 5 [::]:631 [::]:*
LISTEN 0 128 [::]:3142 [::]:*
LISTEN 0 5 [::]:19150 [::]:*


> Thomas

Thank You.

Thomas Pircher

unread,
Feb 17, 2021, 3:30:04 AM2/17/21
to
Gene Heskett wrote:
>apt/synaptic installed so I assume you mean /var/www etc

Hi Gene,

actually I meant the path part in the URL, so if you reach your web
server on localhost on the HTTP protocol, then the URL would be
http://localhost/cgi-bin/awstats.pl

>ene@coyote:/var/www/cgi-bin$ ls -R

It looks like you have a lot of CGI scripts installed, so the only way
to find out how to reach the awstats page is to read the Apache
configuration.

First, check if you have /etc/apache2/conf-available/awstats.conf (as
described in /usr/share/doc/awstats/README.Debian.gz).
Further, is that config enabled? Does the symbolic link
/etc/apache2/conf-enabled/awstats.conf exist?

What is the content of that file?

>ss -nlpt
>A new to me command but:

Hmm, sorry, I should have said that you need to run this command as
root, otherwise you won't see all services, and it won't show you the
process name. `ss` is a replacement for the `netstat` command.

Thomas

Gene Heskett

unread,
Feb 17, 2021, 12:10:05 PM2/17/21
to
On Wednesday 17 February 2021 03:03:05 Thomas Pircher wrote:

> Gene Heskett wrote:
> >apt/synaptic installed so I assume you mean /var/www etc
>
> Hi Gene,
>
> actually I meant the path part in the URL, so if you reach your web
> server on localhost on the HTTP protocol, then the URL would be
> http://localhost/cgi-bin/awstats.pl
>
> >ene@coyote:/var/www/cgi-bin$ ls -R
>
Connection refused, awstats.pl isn't there.

> It looks like you have a lot of CGI scripts installed, so the only way
> to find out how to reach the awstats page is to read the Apache
> configuration.
>
> First, check if you have /etc/apache2/conf-available/awstats.conf (as
> described in /usr/share/doc/awstats/README.Debian.gz).
> Further, is that config enabled? Does the symbolic link
> /etc/apache2/conf-enabled/awstats.conf exist?
>
No.

> What is the content of that file?
>
> >ss -nlpt
> >A new to me command but:
>
> Hmm, sorry, I should have said that you need to run this command as
> root, otherwise you won't see all services, and it won't show you the
> process name. `ss` is a replacement for the `netstat` command.
>
> Thomas
root@coyote:~$ ss -nlpt
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 5 0.0.0.0:631 0.0.0.0:* users:(("cupsd",pid=12811,fd=9))
LISTEN 0 128 0.0.0.0:443 0.0.0.0:* users:(("apache2",pid=1145,fd=4),
("apache2",pid=1144,fd=4),("apache2",pid=1119,fd=4))
LISTEN 0 32 0.0.0.0:7741 0.0.0.0:* users:(("lisa",pid=770,fd=4))
LISTEN 0 64 0.0.0.0:10080 0.0.0.0:* users:(("xinetd",pid=936,fd=5))
LISTEN 0 128 0.0.0.0:6309 0.0.0.0:* users:(("apache2",pid=1145,fd=3),
("apache2",pid=1144,fd=3),("apache2",pid=1119,fd=3))
LISTEN 0 16 127.0.0.1:3493 0.0.0.0:* users:(("upsd",pid=988,fd=4))
LISTEN 0 128 0.0.0.0:3142 0.0.0.0:* users:(("apt-cacher-ng",pid=864,fd=5))
LISTEN 0 64 0.0.0.0:6566 0.0.0.0:* users:(("xinetd",pid=936,fd=9))
LISTEN 0 5 0.0.0.0:19150 0.0.0.0:* users:(("gkrellmd",pid=896,fd=3))
LISTEN 0 128 127.0.0.1:783 0.0.0.0:* users:(("spamd child",pid=15804,fd=5),("spamd
child",pid=15803,fd=5),("spamd",pid=15802,fd=5))
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=899,fd=3))
LISTEN 0 5 [::]:631 [::]:* users:(("cupsd",pid=12811,fd=10))
LISTEN 0 128 [::]:3142 [::]:* users:(("apt-cacher-ng",pid=864,fd=6))
LISTEN 0 5 [::]:19150 [::]:* users:(("gkrellmd",pid=896,fd=4))

Hummmm,
oot@coyote:conf-available$ locate awstats.pl
/usr/lib/cgi-bin/awstats.pl
root@coyote:conf-available$

odd place. Soft link it to the above /var/www/cgi-bin?

and:
root@coyote:conf-available$ ls -1 `locate awstats.conf`
/etc/awstats/awstats.conf
/etc/awstats/awstats.conf.local
/var/lib/dpkg/info/awstats.conffiles

So obviously apache2 has zero knowledge of awstats, yet awstats was
installed here from the stretch repo's?????

Same story it appears for awffull whose output I like slightly better. Zero
connection to apache2.

In wheezy, all this Just Worked. Running slowly out of hair, but it went grey 20 years back.
anyway. :)

Thanks Thomas.

Thomas Pircher

unread,
Feb 17, 2021, 1:20:05 PM2/17/21
to
Gene Heskett wrote:
>On Wednesday 17 February 2021 03:03:05 Thomas Pircher wrote:
>> http://localhost/cgi-bin/awstats.pl
>>
>Connection refused, awstats.pl isn't there.

Ok, from the output of ss it looks like you are running Apache on port
443, so you can try https://localhost/cgi-bin/awstats.pl

It looks like Apache is also running on other ports, but I have no idea
what protocol they are serving.

>> Further, is that config enabled? Does the symbolic link
>> /etc/apache2/conf-enabled/awstats.conf exist?
>>
>No.

You probably need to enable this config with
a2enconf awstats

and then restart Apache.

>odd place. Soft link it to the above /var/www/cgi-bin?

No, the config file above will tell Apache where to find the binary.

>So obviously apache2 has zero knowledge of awstats, yet awstats was
>installed here from the stretch repo's?????

Have a look in /usr/share/doc/awstats/README.Debian.gz this is described
there.

>In wheezy, all this Just Worked. Running slowly out of hair, but it went grey 20 years back.
>anyway. :)

It could be worse, they could have fallen out before they had time to
turn gray.

Thomas

Gene Heskett

unread,
Feb 17, 2021, 4:40:05 PM2/17/21
to
On Wednesday 17 February 2021 13:10:23 Thomas Pircher wrote:

> Gene Heskett wrote:
> >On Wednesday 17 February 2021 03:03:05 Thomas Pircher wrote:
> >> http://localhost/cgi-bin/awstats.pl
> >
> >Connection refused, awstats.pl isn't there.
>
> Ok, from the output of ss it looks like you are running Apache on port
> 443, so you can try https://localhost/cgi-bin/awstats.pl
>
> It looks like Apache is also running on other ports, but I have no
> idea what protocol they are serving.
>
> >> Further, is that config enabled? Does the symbolic link
> >> /etc/apache2/conf-enabled/awstats.conf exist?
> >
> >No.
>
> You probably need to enable this config with
> a2enconf awstats
>
> and then restart Apache.
>
> >odd place. Soft link it to the above /var/www/cgi-bin?
>
> No, the config file above will tell Apache where to find the binary.
>
> >So obviously apache2 has zero knowledge of awstats, yet awstats was
> >installed here from the stretch repo's?????
>
> Have a look in /usr/share/doc/awstats/README.Debian.gz this is
> described there.
>
I'll do that, thanks.

> >In wheezy, all this Just Worked. Running slowly out of hair, but it
> > went grey 20 years back. anyway. :)
>
> It could be worse, they could have fallen out before they had time to
> turn gray.

They are doing that too, darn it. Can't be because they are 86 yo can it?
Heck at my age I don't even buy green banana's. But the heart mechanics
up at WVU/Ruby looked at their work a month back, sent me home with a
modified script and told me to come back next year for another checkup.
Must have confidence in their work. ;-)
>
> Thomas
0 new messages