Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

nginx.conf gets overwitten by vestacp

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
delebash
Posts: 22
Joined: Mon Aug 24, 2015 5:28 pm

nginx.conf gets overwitten by vestacp
  • Quote

Post by delebash » Thu Jun 09, 2016 4:12 am

I am adding an ssl redirect in nginx.conf which works but if I add another alias to that domain via vestacp then the nginx.conf is overwritten.

Sample config

Code: Select all

server {
    listen      162.243.133.102:80;
    server_name ageektech.com dan.ageektech.com;
    error_log  /var/log/apache2/domains/ageektech.com.error.log error;
    return 301 https://$server_name$request_uri;
    
In the above code I have added an https redirect

Code: Select all

 return  301 https://$server_name$request_uri;
If I then make a change in vestacp for this domain say add another alias joe.ageektech.com, the nginx.conf file gets re-written.

Where do I make custom nginx.conf changes that will not be overwritten.
Top

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

Re: nginx.conf gets overwitten by vestacp
  • Quote

Post by skurudo » Wed Jun 15, 2016 12:30 pm

You have two options here:
- make you own template
or
- use force-ssl template https://vestacp.com/docs/#how-to-force-https
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Server”



  • 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