From f7b70ac18f9f585fe0e586b5b6eb9e8735822af2 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 4 Jun 2015 18:34:13 +0200 Subject: apache: directly use the apache conf from /etc/munin, use a2en{site,conf} to enable the site and the conf --- etc/apache2/conf-available/munin.conf | 1 + etc/apache2/conf.d/munin.conf | 102 ---------------------------------- etc/munin/apache.conf | 96 ++++++++++++++++++++++++++++++++ update_jdn.sh | 3 +- 4 files changed, 99 insertions(+), 103 deletions(-) create mode 120000 etc/apache2/conf-available/munin.conf delete mode 100644 etc/apache2/conf.d/munin.conf create mode 100644 etc/munin/apache.conf diff --git a/etc/apache2/conf-available/munin.conf b/etc/apache2/conf-available/munin.conf new file mode 120000 index 00000000..56fedfa9 --- /dev/null +++ b/etc/apache2/conf-available/munin.conf @@ -0,0 +1 @@ +../../munin/apache.conf \ No newline at end of file diff --git a/etc/apache2/conf.d/munin.conf b/etc/apache2/conf.d/munin.conf deleted file mode 100644 index feb4e9fd..00000000 --- a/etc/apache2/conf.d/munin.conf +++ /dev/null @@ -1,102 +0,0 @@ -# Enable this for template generation -Alias /munin /var/cache/munin/www - -# 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 -# -# Order allow,deny -# Allow from localhost 127.0.0.0/8 ::1 -# AuthUserFile /etc/munin/munin-htpasswd -# AuthName "Munin" -# AuthType Basic -# require valid-user -# - - - Order allow,deny - 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. - # - - - ExpiresActive On - ExpiresDefault M310 - - - - -# Enables fastcgi for munin-cgi-html if present -# -# -# SetHandler fastcgi-script -# -# - -# -# SetHandler None -# - -# Enables fastcgi for munin-cgi-graph if present -ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph - - Order allow,deny - Allow from localhost 127.0.0.0/8 ::1 - # AuthUserFile /etc/munin/munin-htpasswd - # AuthName "Munin" - # AuthType Basic - # require valid-user - - SetHandler fastcgi-script - - - -ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html - - Order allow,deny - Allow from localhost 127.0.0.0/8 ::1 - # AuthUserFile /etc/munin/munin-htpasswd - # AuthName "Munin" - # AuthType Basic - # require valid-user - - SetHandler fastcgi-script - - - -ExtendedStatus On - - # - # Allow server status reports generated by mod_status, - # with the URL of http://servername/server-status - # Change the ".example.com" to match your domain to enable. - # - - SetHandler server-status - Order deny,allow - Deny from all - Allow from 127.0.0.1 - Allow from 46.16.73.183 - - - diff --git a/etc/munin/apache.conf b/etc/munin/apache.conf new file mode 100644 index 00000000..95786274 --- /dev/null +++ b/etc/munin/apache.conf @@ -0,0 +1,96 @@ +# Enable this for template generation +Alias /munin /var/cache/munin/www + +# 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 +# +# Order allow,deny +# Allow from localhost 127.0.0.0/8 ::1 +# AuthUserFile /etc/munin/munin-htpasswd +# AuthName "Munin" +# AuthType Basic +# require valid-user +# + + + Require all granted + 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. + # + + + ExpiresActive On + ExpiresDefault M310 + + + + +# Enables fastcgi for munin-cgi-html if present +# +# +# SetHandler fastcgi-script +# +# + +# +# SetHandler None +# + +# Enables fastcgi for munin-cgi-graph if present +ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph + + Require all granted + # AuthUserFile /etc/munin/munin-htpasswd + # AuthName "Munin" + # AuthType Basic + # require valid-user + + SetHandler fastcgi-script + + + +ScriptAlias /munin-cgi/munin-cgi-html /usr/lib/munin/cgi/munin-cgi-html + + Require all granted + # AuthUserFile /etc/munin/munin-htpasswd + # AuthName "Munin" + # AuthType Basic + # require valid-user + + SetHandler fastcgi-script + + + +ExtendedStatus On + + # + # Allow server status reports generated by mod_status, + # with the URL of http://servername/server-status + # Change the ".example.com" to match your domain to enable. + # + + SetHandler server-status + Require ip 127.0.0.1 46.16.73.183 + + + diff --git a/update_jdn.sh b/update_jdn.sh index 3c6c7443..a2af8cf9 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -216,7 +216,8 @@ if [ ! -e /etc/apache2/mods-enabled/proxy.load ] ; then fi sudo chown root.root /etc/sudoers.d/jenkins ; sudo chmod 700 /etc/sudoers.d/jenkins sudo chown root.root /etc/sudoers.d/jenkins-adm ; sudo chmod 700 /etc/sudoers.d/jenkins-adm -sudo ln -sf /etc/apache2/sites-available/jenkins.debian.net /etc/apache2/sites-enabled/jenkins.conf +sudo a2ensite -q jenkins.debian.net +auso a2enconf -q munin sudo chown jenkins-adm.jenkins-adm /etc/apache2/sites-enabled/jenkins.conf # for reproducible.d.n url rewriting: [ -L /var/www/userContent ] || sudo ln -sf /var/lib/jenkins/userContent /var/www/userContent -- cgit v1.2.3-54-g00ecf