Permalink
Browse files

Allow user to specify a custom port for the graphite webapp apache vh…

…ost.
  • Loading branch information...
1 parent b52335f commit cab3d15d9c50dd39a25eb2ca7a602f16de67d0af @Kami committed Sep 4, 2012
View
@@ -9,6 +9,7 @@
default[:graphite][:graphite_web][:uri] = "http://launchpadlibrarian.net/82112308/graphite-web-#{node[:graphite][:version]}.tar.gz"
default[:graphite][:graphite_web][:checksum] = "cc78bab7fb26b"
+default[:graphite][:graphite_web][:port] = 80
default[:graphite][:graphite_web][:use_mod_wsgi] = false
default[:graphite][:carbon][:line_receiver_interface] = "127.0.0.1"
@@ -4,7 +4,11 @@
# you will need to change all the occurances of /opt/graphite/
# in this file to your chosen install location.
-<VirtualHost *:80>
+<% if node[:graphite][:graphite_web][:port] != 80 && node[:graphite][:graphite_web][:port] != 443 %>
+Listen <%= node[:graphite][:graphite_web][:port] %>
+<% end %>
+
+<VirtualHost *:<%= node[:graphite][:graphite_web][:port] %>>
DocumentRoot /opt/graphite/webapp
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
@@ -8,6 +8,10 @@
# you will need to change all the occurances of /opt/graphite/
# in this file to your chosen install location.
+<% if node[:graphite][:graphite_web][:port] != 80 && node[:graphite][:graphite_web][:port] != 443 %>
+Listen <%= node[:graphite][:graphite_web][:port] %>
+<% end %>
+
<VirtualHost *:80>
ServerName <%= node[:graphite][:url] %>
DocumentRoot "/opt/graphite/webapp"

0 comments on commit cab3d15

Please sign in to comment.