Skip to content

Commit

Permalink
redmine::apache: Fix duplicated NameVirtualHost directives.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwarf committed Jun 25, 2015
1 parent b4a2626 commit 5b8f70a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 10 additions & 0 deletions manifests/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@
ensure => 'present',
}
}
# XXX on debian Listen 443 is set in ports.conf, but NameVirtualHost is not
if ! defined(File_line['namevirtualhost-443']) {
file_line { 'namevirtualhost-443':
ensure => 'present',
path => '/etc/apache2/ports.conf',
line => 'NameVirtualHost *:443',
match => '^\s*NameVirtualHost\s*\*:443',
notify => Service['apache']
}
}
file { $::redmine::ssl_cert:
ensure => 'present',
owner => 'www-data',
Expand Down
2 changes: 0 additions & 2 deletions templates/passenger.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# File Managed by Puppet
NameVirtualHost <%= @ip_addr %>:80
<% if scope.lookupvar('redmine::ssl') %>
NameVirtualHost <%= @ip_addr %>:443
<VirtualHost <%= @ip_addr %>:80>
ServerName <%= @server_name %>
<%- if @serveraliases != "" -%>
Expand Down

0 comments on commit 5b8f70a

Please sign in to comment.