<VirtualHost *:80>
    ServerName <%= @params[:server_name] %>
    <Proxy *>
        Order deny,allow
        Allow from all
        Require all granted
    </Proxy>

    ProxyRequests           Off
    ProxyPreserveHost       On
    ProxyPass               /       http://127.0.0.1:<%= @params[:server_port] %>/ connectiontimeout=5 timeout=300
    ProxyPassReverse        /       http://127.0.0.1:<%= @params[:server_port] %>/
    <Location />
        Order allow,deny
        Allow from all
    </Location>

    <%= if @params[:force_ssl]? %>
        RewriteEngine on
        RewriteCond %{HTTP:X-Forwarded-Proto} !https
        RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

    <%= end %>
    ErrorLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-error.log
    CustomLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-access.log combined

    LogLevel warn
</VirtualHost>

<VirtualHost *:80>
    ServerName <%= @params[:server_name] %>
    <Proxy *>
        Order deny,allow
        Allow from all
        Require all granted
    </Proxy>

    ProxyRequests           Off
    ProxyPreserveHost       On
    ProxyPass               /       http://127.0.0.1:<%= @params[:server_port] %>/ connectiontimeout=5 timeout=300
    ProxyPassReverse        /       http://127.0.0.1:<%= @params[:server_port] %>/
    <Location />
        Order allow,deny
        Allow from all
    </Location>

    <% if @params[:force_ssl] %>
        RewriteEngine on
        RewriteCond %{HTTP:X-Forwarded-Proto} !https
        RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

    <% end %>
    ErrorLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-error.log
    CustomLog <%= node['apache']['log_dir'] %>/<%= @params[:name] %>-access.log combined

    LogLevel warn
</VirtualHost>

Use Ruby control block, not a print operator
Use Ruby control block, not a print operator
