61 lines
2 KiB
Text
61 lines
2 KiB
Text
# Example configuration for Apache httpd with cgi generated graphs.
|
|
#
|
|
# To use this example config file you need to enable cgi graphs in Munin. Add
|
|
# following three lines to /etc/munin/conf.d/local.conf (without # character):
|
|
#
|
|
# graph_strategy cgi
|
|
# html_strategy cgi
|
|
# cgiurl_graph /munin/graph
|
|
#
|
|
# Then copy this file to /etc/httpd/conf.d/ directory and restart httpd.
|
|
#
|
|
# Access Munin at http://localhost/munin/
|
|
|
|
|
|
<VirtualHost *:80>
|
|
ServerName localhost
|
|
ServerAdmin root@localhost
|
|
ErrorLog /var/log/httpd/munin.localhost-error.log
|
|
CustomLog /var/log/httpd/munin.localhost-access.log combined
|
|
DocumentRoot /var/www/html
|
|
|
|
# Rewrites for graph/html generated by cgi
|
|
RewriteEngine On
|
|
RewriteRule ^/munin/static/(.*) /var/www/html/munin/static/$1 [L]
|
|
RewriteRule ^/munin/graph/(.*) /munin-cgi/munin-cgi-graph/$1 [L,PT]
|
|
RewriteRule ^/munin/(.*) /munin-cgi/munin-cgi-html/$1 [L,PT]
|
|
RewriteRule ^/munin$ /munin/ [R]
|
|
ScriptAlias /munin-cgi/ /var/www/html/munin/cgi/
|
|
|
|
# FastCGI
|
|
<Directory "/var/www/html/munin/cgi">
|
|
Options +ExecCGI
|
|
<IfModule mod_fcgid.c>
|
|
SetHandler fcgid-script
|
|
</IfModule>
|
|
<IfModule !mod_fcgid.c>
|
|
SetHandler cgi-script
|
|
</IfModule>
|
|
</Directory>
|
|
</VirtualHost>
|
|
|
|
|
|
# Uncomment following lines to require authentication:
|
|
|
|
# <Directory /var/www/html/munin>
|
|
# AuthUserFile /etc/munin/munin-htpasswd
|
|
# AuthName "Munin"
|
|
# AuthType Basic
|
|
# Require valid-user
|
|
# # This next part requires mod_expires to be enabled.
|
|
# #
|
|
# # We could use <IfModule mod_expires> around here, but I want it to be
|
|
# # as evident as possible that you either have to load mod_expires _or_
|
|
# # you coment out/remove these lines.
|
|
# #
|
|
# # Set the default expiery time for files 5 minutes 10 seconds from
|
|
# # their creation (modification) time. There are probably new files by
|
|
# # that time.
|
|
# ExpiresActive On
|
|
# ExpiresDefault M310
|
|
# </Directory>
|