Page 1 of 1

Can't get Nginx templates to work

Posted: Mon Aug 21, 2017 7:19 am
by brianbws
I've tried following the documentation to add a template for force https, but there is no where under web or packages to select the force-https template. Yes, I restarted nginx and the server several times.

I don't see any drop down menu for any of these templates in Vesta CP anywhere. New install, nginx + php-fpm.
Image

Re: Can't get Nginx templates to work

Posted: Mon Aug 21, 2017 9:16 am
by skurudo

Code: Select all

service vesta restart
?

Re: Can't get Nginx templates to work

Posted: Tue Aug 22, 2017 9:41 am
by brianbws
Yes, restarted vesta several times.

It looks like it's showing templates form the nginx/php-fpm directory above and not the nginx/ directory now that I look at it.

Re: Can't get Nginx templates to work

Posted: Tue Aug 22, 2017 2:56 pm
by gecube_ru
I can't advise anything.
But the template works on my server.
Look at the screenshot (Web -> editing domain)

Image

Re: Can't get Nginx templates to work

Posted: Thu Oct 26, 2017 6:30 pm
by brianbws
Hmm, interesting. I don't have a "Proxy Supprot NGINX" section. I have a "Web Template NGINX" and "Backend Template PHP-FPM" section. Using Vesta v0.9.8-17.

I have found though, I can modify templates in the /usr/local/vesta/data/templates/web/nginx/php-fpm/ directory and select them from the "Web Template NGINX" section.

The "Backend Template PHP-FPM" section remains a mystery of where that comes from or what its function is. I see default, no-php, and socket as dropdown options.

Re: Can't get Nginx templates to work

Posted: Mon Mar 05, 2018 2:28 pm
by amirb
Hi everyone
I have the same problem.
my server VestaCP version is 0.9.8-19 and I install it with Nginx + PHP-fpm.
i don't have the 'Proxy Support Nginx' section too and all the files in the /usr/local/vesta/data/templates/web/nginx/php-fpm/ are listed in the "Web Template NGINX" section.

Re: Can't get Nginx templates to work

Posted: Wed Nov 13, 2019 12:52 am
by fngatia
With PHP-FPM, the templates are sourced from this floder /usr/local/vesta/data/templates/web/nginx/php-fpm/ Am using CENTOS 7.x on Vesta Release 0.9.8-26. I found a working solution.

Please copy the files from:

Code: Select all

https://github.com/cybersholt/VestaCP-Nginx-Force-SSL
to:

Code: Select all

/usr/local/vesta/data/templates/web/nginx/php-fpm/
then restart vesta:

Code: Select all

service vesta restart