We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
What are the NGINX web templates for? Topic is solved
What are the NGINX web templates for?
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
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
Re: What are the NGINX web templates for?
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:
... 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.
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;
Re: What are the NGINX web templates for?
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.
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.
Re: What are the NGINX web templates for?
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).
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).