# Custom nginx settings per domain

**URL:** <https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222>\
**Category:** Web\
**Created:** [April 9, 2021, 8:20pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222 "2021-04-09T20:20:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishav](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@ishav](https://forum.hestiacp.com/u/ishav)\
**Post date:** [April 9, 2021, 8:20pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/1 "2021-04-09T20:20:15Z")

</div>

The default templates work for almost all the requirements but, sometimes we need to add additional rules which get deleted on update. Is there a way we could add the rules using a conf file kept in users ftp folder? So basically add a directive “include username/nginx/\*.conf;”

---

<div class="post-metadata">

**Author:** ![falzo](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/falzo/32/10_2.png) [@falzo](https://forum.hestiacp.com/u/falzo)\
**Post date:** [April 10, 2021, 11:39am UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/2 "2021-04-10T11:39:58Z")

</div>

check the config files, there already is a general include in there that allows to place a custom file in /home/user/conf/web/domain by the name of nginx.ssl.conf\_something or similar. this can hold some additional rules and won’t get deleted/overwritten.

for mor complex stuff you’d still need your own templates tho

---

<div class="post-metadata">

**Author:** ![fakruzaruret](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/f/cab0a1/32.png) [@fakruzaruret](https://forum.hestiacp.com/u/fakruzaruret)\
**Post date:** [April 11, 2021, 5:35pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/3 "2021-04-11T17:35:19Z")

</div>

The nginx file is converted to default when ssl certificate is renewed. Do we need to edit the file as manual for each ssl renewing?

---

<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:** [April 11, 2021, 6:10pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/4 "2021-04-11T18:10:27Z")

</div>

Additional rules can be created in  
/home/user/conf/domain/web/nginx.conf\_xxxx and /home/user/conf/domain/web/nginx.ssl.conf

---

<div class="post-metadata">

**Author:** ![falzo](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/falzo/32/10_2.png) [@falzo](https://forum.hestiacp.com/u/falzo)\
**Post date:** [April 11, 2021, 6:32pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/5 "2021-04-11T18:32:02Z")

</div>

no. do _not_ edit the regular conf file. please read again what has been answered 😉

---

<div class="post-metadata">

**Author:** ![fakruzaruret](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/f/cab0a1/32.png) [@fakruzaruret](https://forum.hestiacp.com/u/fakruzaruret)\
**Post date:** [April 11, 2021, 7:02pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/6 "2021-04-11T19:02:57Z")

</div>

I created a new file if domain renewed. I need to modify default nginx ssl at /home/user/conf/web/domain.com/domain.com.ssl.conf file. How can I use my customized file that istihbaratyedek.nginx.ssl.conf file at picture. domain.com.ssl.conf converted to default and I have to include another file or edit file when ssl renewed. Are U sure it is not deleted/overwritten?

 ![image](https://forum.hestiacp.com/uploads/default/original/2X/4/49753636d3cf5ea7b1450de2d7275871fab97d62.png)

---

<div class="post-metadata">

**Author:** ![Raphael](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/raphael/32/5217_2.png) [@Raphael](https://forum.hestiacp.com/u/Raphael)\
**Post date:** [April 11, 2021, 7:04pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/7 "2021-04-11T19:04:11Z")

</div>

custom template and do not ignore the fat “DO NOT EDIT”-header in top of the file: [Server management — Hestia Control Panel documentation](https://docs.hestiacp.com/admin_docs/server_management.html#how-do-web-templates-work)

---

<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:** [April 12, 2021, 8:17am UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/8 "2021-04-12T08:17:19Z")

</div>

In 1.4.0 we have added an option to allow the redirection

 ![Screenshot 2021-04-12 at 10.16.29](https://forum.hestiacp.com/uploads/default/original/2X/5/57622c7560a08bc0f257fc2639d6f2143eebc690.png)

---

<div class="post-metadata">

**Author:** ![ishav](https://forum.hestiacp.com/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@ishav](https://forum.hestiacp.com/u/ishav)\
**Post date:** [April 12, 2021, 1:50pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/9 "2021-04-12T13:50:26Z")

</div>

Wonderful, as an SEO I have awaited this feature for a long time.  
Thanks and keep up the good 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:** [May 12, 2021, 1:51pm UTC](https://forum.hestiacp.com/t/custom-nginx-settings-per-domain/3222/10 "2021-05-12T13:51:01Z")

</div>

Closed on May 12, 2021, 1:51pm UTC

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