Customize Nginx template file

I’ve been searching in your Forum, for info about this topic.
In order to customize Nginx template file, you suggest to create a nginx.ssl.conf_XXX file in the /home/USER/conf/web/DOMAIN.TLD directory.
However I notice that the name you are using in the default Nginx template is:
include /home/USER/conf/web/DOMAIN.TLD/nginx.forcessl.conf*;

  1. Which is the actual file name to use? nginx.ssl.conf* or nginx.forcessl.conf*

  2. I would like to add some custom directives into the template.
    If I’m not wrong, does it mean that I have to copy the whole content of nginx.ssl.conf, saving it with a name like nginx.ssl.conf_XXX and then in this new file add my custom directives?

nginx.forcessl.conf is used to load config if redirect to ssl is enabled and will be used to redirect the user.

By default when SSL is enable you should have:
nginx.conf and nginx.ssl.conf for the config files

So nginx.conf_xxx and nginx.ssl.conf_xxx easiest method is to create a symbolic link with ln -s

So I could name it something like nginx.ssl.conf_custom, right?

But what about the content? Should I copy over the content of nginx.ssl.conf into nginx.ssl.conf_custom?
And then add my custom directive in nginx.ssl.conf_custom?

No only your directives not the original template.

Other options would be creating a custom templates will all the changes you want then you can every thing see Web domains and SSL Certicates — Hestia Control Panel documentation


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.