[graphite-web] Improve vhost config (includes fix for #1141701)
Jamie Nguyen
jamielinux at fedoraproject.org
Wed Oct 1 13:56:21 UTC 2014
commit 39ec3c863c2560bda54363195fed5182f34df561
Author: Jamie Nguyen <j at jamielinux.com>
Date: Wed Oct 1 13:53:18 2014 +0100
Improve vhost config (includes fix for #1141701)
graphite-web-vhost.conf | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/graphite-web-vhost.conf b/graphite-web-vhost.conf
index 8d3737b..b79ce41 100644
--- a/graphite-web-vhost.conf
+++ b/graphite-web-vhost.conf
@@ -1,13 +1,16 @@
# Graphite Web Basic mod_wsgi vhost
<VirtualHost *:80>
-
ServerName graphite-web
DocumentRoot "/usr/share/graphite/webapp"
ErrorLog /var/log/httpd/graphite-web-error.log
CustomLog /var/log/httpd/graphite-web-access.log common
- Alias /media/ "##PYTHON_SITELIB##/django/contrib/admin/media/"
+ # Header set Access-Control-Allow-Origin "*"
+ # Header set Access-Control-Allow-Methods "GET, OPTIONS"
+ # Header set Access-Control-Allow-Headers "origin, authorization, accept"
+ # Header set Access-Control-Allow-Credentials true
+
WSGIScriptAlias / /usr/share/graphite/graphite-web.wsgi
WSGIImportScript /usr/share/graphite/graphite-web.wsgi process-group=%{GLOBAL} application-group=%{GLOBAL}
@@ -15,9 +18,22 @@
SetHandler None
</Location>
+ Alias /media/ "##PYTHON_SITELIB##/django/contrib/admin/media/"
<Location "/media/">
SetHandler None
</Location>
+ <Directory "/usr/share/graphite/">
+ <IfModule mod_authz_core.c>
+ # Apache 2.4
+ Require all granted
+ </IfModule>
+ <IfModule !mod_authz_core.c>
+ # Apache 2.2
+ Order Deny,Allow
+ Deny from all
+ Allow from 127.0.0.1
+ Allow from ::1
+ </IfModule>
+ </Directory>
</VirtualHost>
-
More information about the scm-commits
mailing list