# Customize Nginx template file

**URL:** <https://forum.hestiacp.com/t/customize-nginx-template-file/4440>\
**Category:** Web\
**Created:** [September 8, 2021, 1:23pm UTC](https://forum.hestiacp.com/t/customize-nginx-template-file/4440 "2021-09-08T13:23:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobet](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/j/b4bc9f/32.png) [@jobet](https://forum.hestiacp.com/u/jobet)\
**Post date:** [September 8, 2021, 1:23pm UTC](https://forum.hestiacp.com/t/customize-nginx-template-file/4440/1 "2021-09-08T13:23:11Z")

</div>

Hi,  
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?

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [September 8, 2021, 1:31pm UTC](https://forum.hestiacp.com/t/customize-nginx-template-file/4440/2 "2021-09-08T13:31:01Z")

</div>

> [@jobet](#):
>
> nginx.forcessl.conf\*

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

---

<div class="post-metadata">

**Author:** ![jobet](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/j/b4bc9f/32.png) [@jobet](https://forum.hestiacp.com/u/jobet)\
**Post date:** [September 8, 2021, 1:55pm UTC](https://forum.hestiacp.com/t/customize-nginx-template-file/4440/3 "2021-09-08T13:55:36Z")

</div>

> [@eris](#):
>
> nginx.ssl.conf\_xxx

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`?

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [September 8, 2021, 1:57pm UTC](https://forum.hestiacp.com/t/customize-nginx-template-file/4440/4 "2021-09-08T13:57:01Z")

</div>

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](https://docs.hestiacp.com/admin_docs/web.html#how-do-web-templates-work)

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [October 8, 2021, 1:57pm UTC](https://forum.hestiacp.com/t/customize-nginx-template-file/4440/5 "2021-10-08T13:57:54Z")

</div>

Closed on October 8, 2021, 1:57pm UTC

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