Edit template for file snginx.conf Topic is solved

Questions regarding the API
Application Programming Interface
ricardo777
Posts: 25
Joined: Mon Sep 30, 2013 8:42 am

Edit template for file snginx.conf

Postby ricardo777 » Tue Jun 17, 2014 4:08 pm

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

ricardo777
Posts: 25
Joined: Mon Sep 30, 2013 8:42 am

Re: Edit template for file snginx.conf

Postby ricardo777 » Tue Jun 17, 2014 4:49 pm

Found it:

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

demian
Posts: 418
Joined: Thu May 16, 2013 5:19 am
Location: Russua, Germany, UK, Ireland, Tuvalu

Re: Edit template for file snginx.conf

Postby demian » Tue Jun 17, 2014 5:53 pm

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

ricardo777
Posts: 25
Joined: Mon Sep 30, 2013 8:42 am

Re: Edit template for file snginx.conf

Postby ricardo777 » Wed Jun 18, 2014 8:17 am

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

demian
Posts: 418
Joined: Thu May 16, 2013 5:19 am
Location: Russua, Germany, UK, Ireland, Tuvalu

Re: Edit template for file snginx.conf

Postby demian » Wed Jun 18, 2014 8:46 am

template consists of two files with extensions tpl(for normal config) and stpl(for security config)
to work correctly you must edit both files

ricardo777
Posts: 25
Joined: Mon Sep 30, 2013 8:42 am

Re: Edit template for file snginx.conf

Postby ricardo777 » Wed Jun 18, 2014 8:50 am

Ah I see, but I only need the snginx because the edit I do is only for the SSL part.

demian
Posts: 418
Joined: Thu May 16, 2013 5:19 am
Location: Russua, Germany, UK, Ireland, Tuvalu

Re: Edit template for file snginx.conf  Topic is solved

Postby demian » Wed Jun 18, 2014 9:05 am

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

skurudo
VestaCP Team
Posts: 7486
Joined: Fri Dec 26, 2014 2:23 pm
Location: Moscow
Contact:

Re: Edit template for file snginx.conf

Postby skurudo » Fri Sep 23, 2016 12:53 pm

Closed.
-> DigitalOcean competition - please, support us
-> fix for phpmyadmin - nice and sweet now


Return to “Scripting / API”



Who is online

Users browsing this forum: No registered users and 1 guest