diff --git a/config/awx-httpd-443.conf b/config/awx-httpd-443.conf index e74e19f199..29f1af4d0a 100644 --- a/config/awx-httpd-443.conf +++ b/config/awx-httpd-443.conf @@ -41,4 +41,5 @@ WSGISocketPrefix /var/run/wsgi + Include conf.d/awx-munin.conf diff --git a/config/awx-munin-el.conf b/config/awx-munin-el.conf new file mode 100644 index 0000000000..41f6183bb6 --- /dev/null +++ b/config/awx-munin-el.conf @@ -0,0 +1,5 @@ +Alias /munin /var/www/html/munin/ + + Order Allow,Deny + Allow from all + diff --git a/config/awx-munin-ubuntu.conf b/config/awx-munin-ubuntu.conf new file mode 100644 index 0000000000..936eb706ca --- /dev/null +++ b/config/awx-munin-ubuntu.conf @@ -0,0 +1,33 @@ + +Alias /munin /var/cache/munin/www + + Order allow,deny + Allow from all + Options FollowSymLinks + + # 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 + + diff --git a/setup.py b/setup.py index 5fd2ee3665..296428ea3b 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ # Copyright (c) 2014 AnsibleWorks, Inc. # All Rights Reserved. -import os, datetime, glob, sys +import os, datetime, glob, sys, shutil from distutils import log from setuptools import setup, find_packages from setuptools.command.sdist import sdist as _sdist @@ -18,8 +18,10 @@ homedir = "/var/lib/awx" sharedir = "/usr/share/awx" if os.path.exists("/etc/debian_version"): webconfig = "/etc/apache2/conf.d" + shutil.copy("config/awx-munin-ubuntu.conf", "config/awx-munin.conf") else: webconfig = "/etc/httpd/conf.d" + shutil.copy("config/awx-munin-el.conf", "config/awx-munin.conf") ##################################################################### # Helper Functions @@ -194,6 +196,7 @@ setup( ]), ("%s" % webconfig, ["config/awx-httpd-80.conf", "config/awx-httpd-443.conf", + "config/awx-munin.conf", ]), ("%s" % sharedir, ["tools/scripts/request_tower_configuration.sh"]), ]