I'd like to add this line to all of my vhost's templates: include /var/www/domain.com/nginx/post-redirect.conf I know how to change this, however I'd like this line to be included only if that file exists. Is there a way I can do that using that templating language? Thanks.
The templatng vars can not check if this file exists. Maybe you should add it as empty file to each site. But take care that this file is not editable by the website owner or they will tale over your server sooner or later
Thanks Till. After trying several things, I found that using a "*" would do the job, this way: include /var/www/domain.com/etc/nginx/post-redirect*.conf If it doesn't match (because it doesn't exists), then it doesn't try to include it. That worked fine for me.