hi, when i click on a graph in munin the graph picture is not displayed. in apache i get the following error: Code: [authz_core:error] [pid 28215] [client 83.149.126.154:61249] AH01630: client denied by server configuration: /usr/lib/munin/cgi/munin-cgi-graph, referer: http://server3.mydomain.de/munin/mydomain.de/server3.mydomain.de/apache_accesses.html the apache.conf in /etc/munin is Code: # Enable this for cgi-based templates # Alias /munin-cgi/static /var/cache/munin/www/static # ScriptAlias /munin-cgi /usr/lib/munin/cgi/munin-cgi-html # <Location /munin-cgi> # Order allow,deny # Allow from localhost 127.0.0.0/8 ::1 # Allow from all # AuthUserFile /etc/munin/munin-htpasswd # AuthName "Munin" # AuthType Basic # require valid-user # </Location> <Directory /var/cache/munin/www> Order allow,deny # Allow from localhost 127.0.0.0/8 ::1 Allow from all Options None # This file can be used as a .htaccess file, or a part of your apache # config file. # # For the .htaccess file option to work the munin www directory # (/var/cache/munin/www) must have "AllowOverride all" or something # close to that set. # AuthUserFile /etc/munin/munin-htpasswd AuthName "Munin" AuthType Basic require valid-user # This next part requires mod_expires to be enabled. # # Set the default expiration time for files to 5 minutes 10 seconds from # their creation (modification) time. There are probably new files by # that time. # <IfModule mod_expires.c> ExpiresActive On ExpiresDefault M310 </IfModule> </Directory> # Enables fastcgi for munin-cgi-html if present #<Location /munin-cgi> # <IfModule mod_fastcgi.c> # SetHandler fastcgi-script # </IfModule> #</Location> #<Location /munin-cgi/static> # SetHandler None #</Location> # Enables fastcgi for munin-cgi-graph if present ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph <Location /munin-cgi/munin-cgi-graph> Order allow,deny # Allow from localhost 127.0.0.0/8 ::1 Allow from all # AuthUserFile /etc/munin/munin-htpasswd # AuthName "Munin" # AuthType Basic # require valid-user <IfModule mod_fcgid.c> SetHandler fcgid-script </IfModule> <IfModule !mod_fcgid.c> SetHandler cgi-script </IfModule> </Location> ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html <Location /munin-cgi/munin-cgi-html> Order allow,deny # Allow from localhost 127.0.0.0/8 ::1 Allow from all # AuthUserFile /etc/munin/munin-htpasswd # AuthName "Munin" # AuthType Basic # require valid-user <IfModule mod_fcgid.c> SetHandler fcgid-script </IfModule> <IfModule !mod_fcgid.c> SetHandler cgi-script </IfModule> </Location> how can i fix this? best regards chico
after commenting out Code: AuthUserFile /etc/munin/munin-htpasswd AuthName "Munin" AuthType Basic require valid-user i get the following error in in apaches error.log and the second in suexec.log: Code: suexec policy violation: see suexec log for more details Code: [2015-06-08 04:41:16]: uid: (5008/web19) gid: (5005/client1) cmd: munin-cgi-graph [2015-06-08 04:41:16]: command not in docroot (/usr/lib/munin/cgi/munin-cgi-graph) [2015-06-08 04:41:20]: uid: (5008/web19) gid: (5005/client1) cmd: .php-fcgi-starter any hints for the n00b here?
SuExec is (hardcoded) configured to not allow executing scripts outside the hard-coded docroot /var/www
Somehow yes. You'd have to create a subdir for munin, e. g. /var/www/munin and copy the complete cgi/ dir from /usr/lib/munin/ there. Then you'd have to adjust the apache config above and change the paths.
done: but now i get errors in apache2's error.log: Code: [Mon Jun 08 12:00:12.043945 2015] [core:notice] [pid 27418] AH00094: Command line: '/usr/sbin/apache2' Can't locate CGI/Fast.pm in @INC (you may need to install the CGI::Fast module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl) at /var/www/munin/cgi/munin-cgi-graph line 36. BEGIN failed--compilation aborted at /var/www/munin/cgi/munin-cgi-graph line 36. [Mon Jun 08 12:00:33.758189 2015] [fcgid:warn] [pid 27446] (104)Connection reset by peer: [client 94.79.158.212:40686] mod_fcgid: error reading data from FastCGI server, referer: http://server3.mydomain.de/munin/mydomain.de/server3.mydomain.de/apache_accesses.html [Mon Jun 08 12:00:33.758356 2015] [core:error] [pid 27446] [client 94.79.158.212:40686] End of script output before headers: munin-cgi-graph, referer: http://server3.mydomain.de/munin/mydomain.de/server3.mydomain.de/apache_accesses.html and suexec.log Code: [2015-06-08 12:00:25]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter [2015-06-08 12:00:26]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter [2015-06-08 12:00:26]: uid: (5003/ispconfig) gid: (5004/ispconfig) cmd: .php-fcgi-starter