Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Dev Section Scripting / API
  • Search

Edit template for file snginx.conf

Questions regarding the API
Application Programming Interface
Locked
  • Print view
Advanced search
8 posts • Page 1 of 1
ricardo777
Posts: 25
Joined: Mon Sep 30, 2013 8:42 am

Edit template for file snginx.conf

Post by 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
Top

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

Re: Edit template for file snginx.conf

Post by ricardo777 » Tue Jun 17, 2014 4:49 pm

Found it:

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

demian
Posts: 543
Joined: Thu May 16, 2013 5:19 am

Re: Edit template for file snginx.conf

Post by 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
Top

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

Re: Edit template for file snginx.conf

Post by 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
Top

demian
Posts: 543
Joined: Thu May 16, 2013 5:19 am

Re: Edit template for file snginx.conf

Post by 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
Top

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

Re: Edit template for file snginx.conf

Post by 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.
Top

demian
Posts: 543
Joined: Thu May 16, 2013 5:19 am

Re: Edit template for file snginx.conf

Post by 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
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Edit template for file snginx.conf

Post by skurudo » Fri Sep 23, 2016 12:53 pm

Closed.
Top


Locked
  • Print view

8 posts • Page 1 of 1

Return to “Scripting / API”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password