I've been using custom vhost config for apache and nginx in ispconfig since forever. Mostly to enhance scoring on internet.nl by altering ssl ciphers, adding custom config/snippets and adding ssl stapling. The last one is where I now stumble. LE abandoned ocsp a while ago and because of that I now get several warning in nginx about it and I want to clear that. I'm trying to alter the custom vhost config to ONLY add ssl stapling when ssl is enabled and LE is NOT enabled. I've tried Code: <tmpl_if name='ssl_enabled'> <tmpl_if name='ssl_letsencrypt' op='!=' value='y'> ..... </tmpl_if> </tmpl_if> but it seems like ispconfig doesn't recognize that, as tasks are stuck in the queue and I get an error in the cron log. Code: PHP Parse error: Unmatched '}' in /usr/local/ispconfig/server/lib/classes/tpl.inc.php(1344) : eval()'d code on line 91 So what is the correct syntax to accomplish what I want?
It seems like ssl_letsencrypt is not set by ISPConfig to be a template option, and also there is none used in default to be a sample, that is why I think you got that error, no match as there is no such option available for us to use. Since vhost config, default or custom, are meant for all web sites, and you want to enable it only for certain site(s) that need SSL with stapling, try using nginx directives to add the same to such site(s). This is just a work around that I can think of for now, and there could be other ways, also you can ask / propose for it to be added to ISPConfig, in the future, if none really existed already as I assumed above.
All fields of the web_domain table should be available by default, so its ok to use that variable. Even if you would use a variable that does not exist, it would not throw this error. But there must be a syntax error in your template.
Oh yes, on that note @till I think I can see that he might need to use == instead of just = there. May be.
Only thing changed is above code added in a before that working template. The line is a straight up copy of another line in the same template. Only the name is changed.
Already tried. Makes no difference. Strange enough does it work flawlessly on another nginx node. Even though the template isn't exactly the same, added lines are. Btw, left this out as I was already inside such if Code: <tmpl_if name='ssl_enabled'> ..... </tmpl_if> Though that too made no difference on the problematic node. I think I'm going to redo the custom template from the latest template out of ispc 3.3.0p3.
So it works on other nginx node except this one, good to know, since it must not be that line, but the whole custom vhost. Why you don't you simply copy it (the whole custom vhost) from that node directly, if it really works on that node?