Page 1 of 1

Edit template for file snginx.conf

Posted: Tue Jun 17, 2014 4:08 pm
by ricardo777
Hello,

Hope I got the right forum.

Is there a possibility that I can edit the way vestacp write the conf file of snginx.conf in the path:

/home/website/conf/web/snginx.conf

Re: Edit template for file snginx.conf

Posted: Tue Jun 17, 2014 4:49 pm
by ricardo777
Found it:

/usr/local/vesta/data/templates/web/nginx

Re: Edit template for file snginx.conf

Posted: Tue Jun 17, 2014 5:53 pm
by demian
nginx.conf and snginx.conf auto-create from template

edit/copy template which you choose and modify him

NOTE: name_template.tpl and name_template.stpl is one template need modify/copy both file if you add some general directive

Re: Edit template for file snginx.conf

Posted: Wed Jun 18, 2014 8:17 am
by ricardo777
Thank you for your reply, but what do you mean with:
NOTE: name_template.tpl and name_template.stpl is one template need modify/copy both file if you add some general directive

Re: Edit template for file snginx.conf

Posted: Wed Jun 18, 2014 8:46 am
by demian
template consists of two files with extensions tpl(for normal config) and stpl(for security config)
to work correctly you must edit both files

Re: Edit template for file snginx.conf

Posted: Wed Jun 18, 2014 8:50 am
by ricardo777
Ah I see, but I only need the snginx because the edit I do is only for the SSL part.

Re: Edit template for file snginx.conf

Posted: Wed Jun 18, 2014 9:05 am
by demian
if yours web site work only htts

template .tpl will be

Code: Select all

server {
    listen      %ip%:%proxy_port%;
    server_name %domain_idn% %alias_idn%;
    return       301 https://%domain_idn%$request_uri; 
}
new directive add template .stpl

Re: Edit template for file snginx.conf

Posted: Fri Sep 23, 2016 12:53 pm
by skurudo
Closed.