$default_folder = '/var/www/data',
$server_name = $hostname,
$https_proxy = 'no',
- $remote_addr = false
+ $remote_addr = false,
+ $http_port = '80',
+ $https_port = '443',
) {
include ssl
$hidden_enabled = hiera('apache::site::hidden', false)
if $hidden_service == true and $hidden_enabled == true {
tor::daemon::hidden_service { $title:
- ports => [ "80 127.0.0.1:80" ],
+ ports => [ "80 127.0.0.1:${apache::http_port}" ],
data_dir => "${tor::daemon::data_dir}/hidden",
require => File["${tor::daemon::data_dir}/hidden"],
ensure => $ensure,
# begin vhost for <%= fqdn %>
-<VirtualHost *:80>
+<VirtualHost *:<%= scope.lookupvar('apache::http_port') %>>
ServerName <%= fqdn %>
DocumentRoot <%= scope.lookupvar('apache::default_folder') %>
# vhost to handle inexistent vhosts
-<VirtualHost *:80>
+<VirtualHost *:<%= scope.lookupvar('apache::http_port') %>>
ServerName error.<%= hosting_domain %>
ServerAlias *.<%= hosting_domain %>
DocumentRoot <%= scope.lookupvar('apache::error_folder') %>
# begin vhost for <%= title %>
-<VirtualHost <%= listen %>:80>
+<VirtualHost <%= listen %>:<%= scope.lookupvar('apache::http_port') %>>
ServerName <%= title %>.<%= hosting_domain %>
<% if server_alias != false %> ServerAlias <%= server_alias %><% end %>
DocumentRoot <%= docroot %>
# end vhost for <%= title %>
<% if ssl == true %>
# begin ssl vhost for <%= title %>
-<VirtualHost <%= listen %>:443>
+<VirtualHost <%= listen %>:<%= scope.lookupvar('apache::https_port') %>>
# Use HTTP Strict Transport Security to force client to use secure connections only
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains"