Page 1 of 1

Multiple web and backend templates

Posted: Sun Jan 24, 2016 3:30 am
by hugues
Hi everyone,

My apologies if this question has already been answered, but I cannot seem to find the answer on the forum and on github (cf. https://github.com/serghey-rodin/vesta/issues).

We are looking to modify the web and backend templates. More importantly, we would like to assign a specific web and backend template per web site (and not per user as it seems to be by default). For example, user A would have different web sites :
  • some_ruby_site.com with Web Template:ruby Backend Template:socket
  • some_php_site.com with Web Template:php_force_ssl Backend Template:socket
Is there a way to do this?

Reading the files in /usr/local/vesta/data/templates/web/nginx/php-fpm, we see this line :

Code: Select all

include     %home%/%user%/conf/web/nginx.%domain%.conf*;
Which seem to imply that we could create files in a specific location to force specific configuration per website. Is there a way to do this in the GUI? It seems easy to do it in command line, but we would rather do it the recommended way.

Our ultimate goal is to permit users to have websites in ruby, in php, etc. so they would need different templates for each web sites. However it seems only possible to assign a package to a user which will force the same templates for all web sites of this user. Are we missing something obvious?

We are using NGINX + PHP-FPM + MariaDB on CentOS 7.

Thanks!

Re: Multiple web and backend templates

Posted: Sun Jan 24, 2016 12:28 pm
by tjebbeke
You can create custom templates with the specific configuration. You can edit the packages or create new with the custom templates as default.

Re: Multiple web and backend templates

Posted: Mon Jan 25, 2016 6:20 pm
by hugues
Thank you for your answer. I guess I didn't explained myself clearly. We know how to create templates and packages, as it is explained in the documentation (at least indirectly cf. https://vestacp.com/docs/#how-to-force-https).

However we are looking to have different templates for each web sites. As far as we can see, we can only assign one package globally for a user and this user will have the same backend and web templates for all his/her web sites.

Re: Multiple web and backend templates

Posted: Mon Jan 25, 2016 8:02 pm
by tjebbeke
As admin you can change the template of each website of each user.

Re: Multiple web and backend templates

Posted: Mon Jan 25, 2016 8:39 pm
by hugues
tjebbeke wrote:As admin you can change the template of each website of each user.
Thank you, we didn't notice this feature. It does work perfectly. And the possibility for the admin account to Login as... also helps. Solved!