P
P
partisan422021-04-13 13:05:27
Apache HTTP Server
partisan42, 2021-04-13 13:05:27

How to publish a resource on lighttpd?

Good day to all. I ask you not to hit hard, but to indicate in which direction to dig.
I have ubuntu server 20.04.
It successfully spins Squid.
But some kind of log analyzer was needed. At first I fought with SquidAnalyzator, but I could not get it under apache2. And in general they write that it does not work very well under debian'image systems.
I paid attention to the SARG + lighttpd bundle. SARG installed, report generated... Beauty. But with the web interface, everything did not work out so easily.
Here is the contents of the file /etc/lighttpd/conf-available/sarg.conf

$HTTP["host"] == "squid-reports.local" { #FDQN

server.document-root = "/var/www/squid-reports/" # Document-root of the webserver
accesslog.filename = "/var/log/lighttpd/squid-reports_access.log" # Web server Access log file
server.errorlog = "/var/log/lighttpd/squid-reports_error.log" # Web server Error log file

}


I restart lighttpd
[email protected]:/var/log$ sudo systemctl restart lighttpd.service
[email protected]:/var/log$ sudo systemctl status lighttpd.service
● lighttpd.service - Lighttpd Daemon
     Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-04-13 10:00:58 UTC; 9s ago
    Process: 25957 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
   Main PID: 25975 (lighttpd)
      Tasks: 1 (limit: 2169)
     Memory: 1.5M
     CGroup: /system.slice/lighttpd.service
             └─25975 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

Apr 13 10:00:58 proxy systemd[1]: Starting Lighttpd Daemon...
Apr 13 10:00:58 proxy lighttpd[25957]: 2021-04-13 10:00:58: (configfile-glue.c.46) DEPRECATED: don't set server options in conditionals, variable: server.errorlog
Apr 13 10:00:58 proxy lighttpd[25957]: 2021-04-13 10:00:58: (server.c.1517) WARNING: unknown config-key: accesslog.filename (ignored)
Apr 13 10:00:58 proxy systemd[1]: Started Lighttpd Daemon.
Apr 13 10:00:58 proxy lighttpd[25975]: 2021-04-13 10:00:58: (configfile-glue.c.46) DEPRECATED: don't set server options in conditionals, variable: server.errorlog
[email protected]:/var/log$


Make sure apache2 is down.
[email protected]:/var/log$ sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Tue 2021-04-13 09:06:38 UTC; 55min ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 6413 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
   Main PID: 761 (code=exited, status=0/SUCCESS)

Apr 13 08:41:24 proxy systemd[1]: Starting The Apache HTTP Server...
Apr 13 08:41:28 proxy apachectl[729]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress th>
Apr 13 08:41:28 proxy systemd[1]: Started The Apache HTTP Server.
Apr 13 09:06:38 proxy systemd[1]: Stopping The Apache HTTP Server...
Apr 13 09:06:38 proxy apachectl[6415]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress t>
Apr 13 09:06:38 proxy systemd[1]: apache2.service: Succeeded.
Apr 13 09:06:38 proxy systemd[1]: Stopped The Apache HTTP Server.


And I'm trying to enter SARG itself.
60756ca803802634742178.png

I understand that the answer lies on the surface, but my eyes are already blurry.
If I am reinventing an unnecessary bicycle, I will be sincerely grateful for pointing me in the right direction :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yuriev, 2021-04-13
@partisan42

You specified squid-reports.local as a host , and you connect via IP address and
knock on the host to the subdirectory (don't forget to add it to /etc/hosts if you don't have a resolver for *.local there)
PS:

DEPRECATED: don't set server options in conditionals, variable: server.errorlog

this is not an error, but a warning, it's just that server.errorlog should not be indicated in this place, this is an outdated practice and will be cut out in future versions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question