Include custom Nginx configuration for each domain

Discussion in 'General' started by jvargas, Dec 13, 2015.

  1. jvargas

    jvargas New Member

    I'd like to add this line to all of my vhost's templates:

    include /var/www/

    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?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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 :)
  3. jvargas

    jvargas New Member

    Thanks Till.
    After trying several things, I found that using a "*" would do the job, this way:
    include /var/www/*.conf
    If it doesn't match (because it doesn't exists), then it doesn't try to include it.
    That worked fine for me.
    till likes this.

Share This Page