Virtualmin Nginx settings to be apllied for all domains

3 posts / 0 new
Last post
#1 Thu, 11/28/2019 - 10:20
dragos@dall.ro

Virtualmin Nginx settings to be apllied for all domains

Dear all

I switched from Apache to Nginx ( LAMP to LEMP ) and I'm happy with it, as everything works much faster and better

The only issue I have now with NGINX and Virtualmin combo is related to general settings for all domains in the Virtualmin.

I mean, makes no sense to me to enter in nginx.conf every time I'm adding a new domain, to make the permalinks modifications or the gzip ones.

Is there any way to make this modifications for all domains hosted into the server?

Like having in /etc/nginx/conf.d or ~/ /default.d some configuration files for each feature I want ?

For example one configuration file for gzip, another for permalinks, another for FCGID Cache and so on ? And once read by nginx to be applied to all servers ?

I could not make it from Features and Plugins - it's breaking nginx conf

Many thanks

Thu, 11/28/2019 - 21:05
dowell22

As far as I know, you could only include additional directives in Server Templates, but you can't modify the default one used in server creation. You could place all custom directives in a separate file and add them using "include" to select domains, and probably place this include in the server template. Use an absolute path.

You could, however, separate each domain in a separate file. It's in the Nginx module configuration.

Wed, 12/11/2019 - 09:13 (Reply to #2)
dragos@dall.ro

Hi Dowell

Is not a must to include them in Server Template if it's difficult but at least to configure once the server and leave it on for the rest of all new domains which are going to be created

For instance a global Gzip conf for all domains, now and in the future And the most annoyng one - to set once for good the permalinks in NGINX from the beginning of the server and not after every domain creation If you have any example or some links where I can learn this, I will apreciate

Thank you