Open sinasalek opened 8 years ago
I was thinkin about that, however I did not investigate much what must be done to add new template configurable via Virtualmin. So I left it as it is. As an alternative I can implement templates in nginx-fpm setting. Current config works well with all major CMS'es. Unless you need something special of course :D
Are you referring to "Additional Nginx directives for new virtual hosts" in nginx-fpm feature config ? that's actually very useful but it's not possible to to it per domain or template and also not possible to modify the original template, you can only append to it. Here is an example for Drupal, there is also a pager for many other applications as well. As you can see it requires quite lots of custom stuff :) https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/
There is very special option in server templates for plugins, Maybe this helps : https://www.virtualmin.com/documentation/developer/plugins look for "Limits and Template Functions"
Yep, I used this config for some time, but current module config fits Drupal 6 and 7 well - most of sites hosted by my server are Drupal based :D And I saw this manual, functions there do not help to create new template type and use it in your module.
:) No it doesn't create new template type, What described in documentation is that it allows for example to expose nginx-fpm module default nginx template to the user so it can be customized per server template. there is another method that parse the outcome template_parse allowing the template to be used for generate the config.
Anyway it'll require some time to implement. Core Nginx module does not support templates too, otherwise my module wouldn't be needed :D
True, core nginx module is actually limited too, it has dozen forks actually :) https://github.com/vixh/nginx-webmin/network
They all work with fcgid I presume :D
Unfortunately yes, only fcgid is supported :(
It would have been great if it was possible to customize the configuration template the way virtualmin' apache module allows. This is important because different sites may require special configuration in nginx to work. like for example Drupal or many other CMSs. It's possible to modify the generate configs in /etc/nginx/sites-available but virtualmin overwrites this sort of modification.