I'm using Munin-cgi as my servers' monitoring system. One moment i realized that i have strange and very annoying notes in my error.log whilst everything kept running well and without errors.
At the moment i commented out everything in my apache config for Munin, and errors are still appearing.
Here is my config:
<VirtualHost *:80>
<Directory />
Options -MultiViews
</Directory>
ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
</VirtualHost>
So if i call the script:
http://<server>/munin-cgi/munin-cgi-graph/DOMAIN/HOST/PICTURE.png?&size_x=800&size_y=400
I get the following error in error.log:
[Thu Oct 20 22:40:32.016850 2016] [authz_core:error] [pid 25196] [client 192.168.235.77:46192] AH01630: client denied by server configuration: /var/www/DOMAIN
That's it. I see nothing suspicious even with maximum trace level turned on. Script is working, and i see its output, but every time a call that script, Apache removes /munin-cgi/munin-cgi-graph/
and tries to access http://<server>//DOMAIN/HOST/PICTURE.png
. Even if i create file /var/www/DOMAIN/HOST/PICTURE.png/index.html
the cgi script still continues to be called, and obviously, messages in error.log disappear.
Maybe there is an error somewhere outside the file in top-level apache configuration files, but i still cannot find it.
The only way to stop warnings was to write
<Location />
Require all granted
</Location>
But of course it's not secure
UPD: This is the log for mod_rewrite turned on:
[Thu Oct 20 19:33:38.672038 2016] [rewrite:trace2] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] init rewrite engine with requested uri /munin-cgi/munin-cgi-graph/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png
[Thu Oct 20 19:33:38.672139 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] applying pattern '^/munin-cgi/favicon.ico' to uri '/munin-cgi/munin-cgi-graph/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672157 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] applying pattern '^/munin-cgi/.*static/(.*)' to uri '/munin-cgi/munin-cgi-graph/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672169 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] applying pattern '^/munin-cgi/(.*\\.html)?$' to uri '/munin-cgi/munin-cgi-graph/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672179 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] applying pattern '^/munin-cgi/munin-cgi-graph/(.*)' to uri '/munin-cgi/munin-cgi-graph/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672189 2016] [rewrite:trace2] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] rewrite '/munin-cgi/munin-cgi-graph/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png' -> '/munin-cgi/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672198 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] applying pattern '^/munin-cgi/(.*.png)$' to uri '/munin-cgi/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672209 2016] [rewrite:trace2] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] rewrite '/munin-cgi/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png' -> '/munin-cgi/munin-cgi-graph/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672221 2016] [rewrite:trace2] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee990a0/initial] forcing '/munin-cgi/munin-cgi-graph/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png' to get passed through to next API URI-to-filename handler
[Thu Oct 20 19:33:38.672453 2016] [rewrite:trace2] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee910a0/subreq] init rewrite engine with requested uri /<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png
[Thu Oct 20 19:33:38.672464 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee910a0/subreq] applying pattern '^/munin-cgi/favicon.ico' to uri '/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672471 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee910a0/subreq] applying pattern '^/munin-cgi/.*static/(.*)' to uri '/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672477 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee910a0/subreq] applying pattern '^/munin-cgi/(.*\\.html)?$' to uri '/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672494 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee910a0/subreq] applying pattern '^/munin-cgi/munin-cgi-graph/(.*)' to uri '/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672510 2016] [rewrite:trace3] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee910a0/subreq] applying pattern '^/munin-cgi/(.*.png)$' to uri '/<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png'
[Thu Oct 20 19:33:38.672517 2016] [rewrite:trace1] [pid 5132] mod_rewrite.c(477): [client <SKIP>] <CLIENT> - - [<SERVER>/sid#7f5e5ef59470][rid#7f5e5ee910a0/subreq] pass through /<DOMAIN>/<HOST>/bind9-pinpoint=1476918806,1476955256.png