Here's my code (I've commented out the if-else part as it's not working)
snippets/contents of my config files
/etc/httpd/conf.d/staff.vhost
Define host_domain "staff"
Include /etc/httpd/conf.d/stage_template.vhost
/etc/httpd/conf.d/stage_template.vhost
#<If "${host_domain} == 'main'">
# ServerAlias stage.myhost.com
#</If>
#<Else>
ServerAlias stage-${host_domain}.myhost.com
#</Else>
${host_domain} can have 3 possible values: main or staff or customer
I have tried these comparisons
"${host_domain} == 'main'"
AH00526: Syntax error on line 9 of /etc/httpd/conf.d/stage_template.vhost: Cannot parse condition clause: syntax error, unexpected T_OP_STR_EQ, expecting '('
"%{host_domain} == 'main'"
AH00526: Syntax error on line 9 of /etc/httpd/conf.d/stage_template.vhost: Cannot parse condition clause: Parse error near '%'
"'${host_domain}' == 'main'"
AH00526: Syntax error on line 10 of /etc/httpd/conf.d/available_vhosts/stage_template.vhost: ServerAlias not allowed here
I was using this page as guide. But it's doesn't have any examples when using custom variables.
Thanks!