saltstack-formulas / apache-formula

Set up and configure the Apache HTTP server

Home Page:http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

On standard.tmpl Customlog and Logformat directive leads to an error

tsenay opened this issue · comments

On my RHEL 7.4 with httpd 2.4.6, the Logformat and Customlog merged directive does not work

 {% if site.get('CustomLog') != False -%}CustomLog {{ vals.CustomLog }} {{ vals.LogFormat }}{% endif %}

This version works better

    {% if site.get('LogFormat') != False -%}LogFormat {{ vals.LogFormat }}{% endif %}
    {% if site.get('CustomLog') != False -%}CustomLog {{ vals.CustomLog }} {% endif %}

can you consider update it ?

Hi @tsenay, mind you submit a PR with the changes you're proposing?

PR Merged into master

Apologies for the issue necromancy, but I believe this change probably breaks things. On Apache 2.4.x (and probably earlier too) the CustomLog directive takes at least two arguments; with this change, it will now only have one argument.

Tested on CentOS 7.4 using Apache 2.4.6.

Use a string to set up value
CustomLog: ‘pattern name’

@tsenay I'm not specifying any CustomLog directive in my pillar data, so I'm using only the defaults provided by the formula; the defaults are now broken as a result of this change.