Skip to content

Commit

Permalink
Fixed missing port in stats vhost file.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspard committed Sep 18, 2012
1 parent 4457cd3 commit f2011c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/zena/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def ancestry(path)
run "chmod 640 /etc/awstats/awstats.#{self[:host]}.conf"

# create stats vhost
stats_vhost = render("#{templates}/stats.vhost.rhtml", :config => self)
stats_vhost = render("#{templates}/stats.vhost.rhtml", :config => self, :vhost_port => (self[:ssl] ? ':80' : ''))
put(stats_vhost, "#{vhost_root}/stats.#{self[:host]}")
run "test -e /etc/apache2/sites-enabled/stats.#{self[:host]} || a2ensite stats.#{self[:host]}"

Expand Down Expand Up @@ -349,6 +349,7 @@ def ancestry(path)
modules << 'ssl'
modules << 'headers'
# Default in debian: no need to change ports.
# Remove NameVirtualHost directives in ports.conf (avoids warnings).
# /etc/apache2/ports.conf:
# Listen 443
end
Expand Down
2 changes: 1 addition & 1 deletion lib/zena/deploy/stats.vhost.rhtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# zena awstats vhost for <%= config[:host] %>
# automatically generated file

<VirtualHost *>
<VirtualHost *<%= vhost_port %>>
ServerName stats.<%= config[:host] %>

DocumentRoot /usr/share/doc/awstats/examples
Expand Down

0 comments on commit f2011c7

Please sign in to comment.