Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Use different template for vhosts when ssl = true #68

Open
nalbion opened this issue Jun 17, 2014 · 2 comments
Open

Use different template for vhosts when ssl = true #68

nalbion opened this issue Jun 17, 2014 · 2 comments

Comments

@nalbion
Copy link
Contributor

nalbion commented Jun 17, 2014

Something like this (based on vhost-ssl.template)

# File Managed by Puppet

<IfDefine SSL>
<IfDefine !NOSSL>

<VirtualHost <%= @ip_addr %>:<%= @port %>>
    ServerAdmin <%= @server_admin_email ||= 'webmaster@localhost' %>
<% if @server_name_value != false -%>
    ServerName <%= @server_name_value %>
<% end -%>

    DocumentRoot <%= @real_docroot %>

    ErrorLog  <%= scope.lookupvar('apache::log_dir') %>/<%= @name %>-error_log
    CustomLog <%= scope.lookupvar('apache::log_dir') %>/<%= @name %>-access_log common

    SSLEngine on
    SSLProtocol all -SSLv2 -SSLv3
    SSLCipherSuite ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!MD5:@STRENGTH
    SSLCertificateFile <%= scope.lookupvar('apache::log_dir') %>/ssl.crt/server.crt
    SSLCertificateKeyFile <%= scope.lookupvar('apache::log_dir') %>/ssl.key/server.key
</VirtualHost>

</IfDefine>
</IfDefine>
@alvagante
Copy link
Member

What about modifying the current one, adding what's missing when we have ssl=true?

@nalbion
Copy link
Contributor Author

nalbion commented Jun 18, 2014

I suppose that would work just as well. I don't know enough about Apache configuration to know whether a lot of the other options in the vhosts XML file are not applicable in an SSL config file

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants