Page 1 of 1

Nginx Web Templates

Posted: Sun Jul 31, 2016 7:55 pm
by robson@lopes
Hello, this is first post on this excellent forum.

Recently I created a custom template for wordpress microcache in vestacp using jessie or centos.

After recompile nginx, the template worked smoothly and syntax ok by nginx.

The problem I noticed a bug in selecting templates. I called template wpmicrocache, then add a domain, marking this template, vestacp made no changes in nginx.conf then changing template for wordpress, my template was loaded.

I noticed that the same problem also occurs with other templates installed by vestacp.

You select moodle and it does not work and then just change to wordpress the moodle template happens to be born in nginx.conf.

Some templates cause problem, after you change to another template and part of the previous template code remains causing syntax error in nginx.

1 - Add a domain
2 - Select Wordpress2 template
3 - Check nginx.conf and Wordpress2 template is not loaded
4 - Change to Wordpress template
5 - Now, Wordpress2 is loaded

Re: Nginx Web Templates

Posted: Wed Aug 10, 2016 10:22 am
by drsdre
I'm having the same issue. My setup is Nginx only (no Apache2) with php-fpm on VestaCP Version:0.9.8 (amd64) Release:16.

The result is like yours that template changes are not taken at first but require another trigger (i.e. change in web server setup like adding certificate or changing to different template) and broken configs. Regarding these configs, I've seen generated configs which only appeared half (i.e. last part) or are missing values for dynamic fields like IP address.

The same VestaCP release with Apache2 and Nginx is not showing this behaviour. I'm trying to find time to debug the VestaCP scripts, but so far I'm stuck with manual editing the generated configs :-(

Andre

Re: Nginx Web Templates

Posted: Thu Jan 19, 2017 5:54 am
by Fleuv
Since you're working in the DNS section of the system you should "submit" your changes for that section of the system by following these steps:
  • Go to USER section.
  • Select the user.
  • From the drop down select: Rebuild DNS.
However you can also add a cronjob doing such a task every x amount of time.