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 General Discussion
  • Search

What are the NGINX web templates for? Topic is solved

General questions about VestaCP
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Vengance
Posts: 12
Joined: Thu Jun 23, 2016 9:09 am

What are the NGINX web templates for?
  • Quote

Post by Vengance » Sun Mar 18, 2018 12:38 pm

Hi,

I've been an apache user for a long time, but since VestaCP doesn't support PHP-FPM for Apache I think about moving to Nginx.
But I am confused by the different web templates, what's the reason behind them and why do some templates exist multiple times? Like "wordpress" and "wordpress2"


Thank you
Top

rhyker2u
Posts: 86
Joined: Thu Jan 19, 2017 11:46 am
Contact:
Contact rhyker2u
Website

Os: Ubuntu 17x
Web: nginx + php-fpm
Re: What are the NGINX web templates for?
  • Quote

Post by rhyker2u » Sun Mar 18, 2018 12:59 pm

NGINX uses web templates similar to Apache. The way VestaCP works is having pre-setup templates for certain environments. So you don't have to spend a lot of time coding the perfect webserver configuration from scratch (as some of us did back in the days prior to VestaCP).

The difference between wordpress and wordpress2? Great question. Used to know the answer too. :-D Wordpress2 is the one you should chose, as the other one doesn't work very well when you like permalinks to work. Thus the main difference is that wordpress.tpl doesn't have this:

Code: Select all

try_files $uri $uri/ /index.php?$args;
... next to some other minor things. However in your case (WP + NGINX) you might want to create a template of your own. Written a howto at viewtopic.php?f=11&t=13668 to save you from pioneering it all together and how to improve your server and WP security.
Top

Vengance
Posts: 12
Joined: Thu Jun 23, 2016 9:09 am

Re: What are the NGINX web templates for?
  • Quote

Post by Vengance » Sun Mar 18, 2018 1:05 pm

Thank you for your answer!
So I always have to change the web template according to the software I use?
With Apache I had one template which I could always use.
Top

rhyker2u
Posts: 86
Joined: Thu Jan 19, 2017 11:46 am
Contact:
Contact rhyker2u
Website

Os: Ubuntu 17x
Web: nginx + php-fpm
Re: What are the NGINX web templates for?
  • Quote

Post by rhyker2u » Sun Mar 18, 2018 1:21 pm

short answer: yes.

I didn't always do that though. I started with a default VestaCP template for anything (default, WP, Joomla, codeigniter, etc.) and then I used to adapt the domain vhost files in /home/admin/conf/web/ manually (as thats how I was accustomed to do things too on CentOS + Apache2 without VestaCP). The drawback of that approach is when VestaCP releases an update, the '/usr/local/vesta/bin/v-rebuild-user admin` is issued and you lose all customizations. Hence its better to create your own templates. However selecting wordpress2.tpl is a great starting point. Once you get the hang of things, you will never ever go back to using anything else than VestaCP (nor Apache2 for that matter, as NGINX-only webserver environments powering WordPress RULE; see my guide here on the forum).
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “General Discussion”



  • 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
 

 

Login  •  Register

I forgot my password