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.
about Nginx as Reverse proxy
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
about Nginx as Reverse proxy
Hello Everyone...
I'm a 10+ yrs experienced Windows Tech-Admin with some 'OK' knowledge of Linux.
I'm in need of upgrading my 2yrs old 1GB VPS to better modern 4GB SSD VPS. So I'm giving it a thorough study as to how I should relish latest nginx performance benefits. I have installed VestaCP and I find it quite remarkably done!
However, since I would want setup and forget once my new VPS, I would want to have clear some of my doubts:
I will be running around 10-15 wordpress sites on this VPS, the visit is quite low but one of my main WP sites can have quite a surge every now and then, ranging from 50 users a day to upto 2000 users a day. So there can be spikes of memory usage by this site, exactly what has encouraged me to upgrade my current VPS setup. Other than this, I would like to host numerous low traffic PHP sites, mostly static which should leverage good page load speed.
I understand exactly what reverse proxy is, and that Vesta uses this architecture, but I want some views if this Reverse Proxy setup will give me good performance benefits... and more importantly... offload Apache's performance problems under sudden visitor surge?
Also please suggest how to use MariaDB instead of Mysql.
All in all, please suggest any performance enhancement measures that should be helpful. But in the end I'd want to have a stable, more healthy setup performing best for years to come.
---Regards,
Gagan
I'm a 10+ yrs experienced Windows Tech-Admin with some 'OK' knowledge of Linux.
I'm in need of upgrading my 2yrs old 1GB VPS to better modern 4GB SSD VPS. So I'm giving it a thorough study as to how I should relish latest nginx performance benefits. I have installed VestaCP and I find it quite remarkably done!
However, since I would want setup and forget once my new VPS, I would want to have clear some of my doubts:
I will be running around 10-15 wordpress sites on this VPS, the visit is quite low but one of my main WP sites can have quite a surge every now and then, ranging from 50 users a day to upto 2000 users a day. So there can be spikes of memory usage by this site, exactly what has encouraged me to upgrade my current VPS setup. Other than this, I would like to host numerous low traffic PHP sites, mostly static which should leverage good page load speed.
I understand exactly what reverse proxy is, and that Vesta uses this architecture, but I want some views if this Reverse Proxy setup will give me good performance benefits... and more importantly... offload Apache's performance problems under sudden visitor surge?
Also please suggest how to use MariaDB instead of Mysql.
All in all, please suggest any performance enhancement measures that should be helpful. But in the end I'd want to have a stable, more healthy setup performing best for years to come.
---Regards,
Gagan
Re: about Nginx as Reverse proxy
Hi mehargags,
Within the Vesta Control Panel you have a few options;
the two main Nginx options,
1. default - serves static content, works well for most sites
2. сaching - dynamic pages are cached for 15 min to handle spontaneous traffic aka reddit-effect
And some others which are irrelevant to this question ( see link below )
From personal experience using the "hosting" mode works great for database intensive sites.
How this works is instead of Apache and PHP loading your site from the database every time someone requests a page Nginx will take a cached copy and serve that instead. This will result in much faster page load times, And less database traffic.
Explanation of the included templates: http://vestacp.com/docs/#template-description
Sorry for my bad explanation, Its getting late here.
I hope this helps you in some way,
Thanks Liam.
Within the Vesta Control Panel you have a few options;
the two main Nginx options,
1. default - serves static content, works well for most sites
2. сaching - dynamic pages are cached for 15 min to handle spontaneous traffic aka reddit-effect
And some others which are irrelevant to this question ( see link below )
From personal experience using the "hosting" mode works great for database intensive sites.
How this works is instead of Apache and PHP loading your site from the database every time someone requests a page Nginx will take a cached copy and serve that instead. This will result in much faster page load times, And less database traffic.
Explanation of the included templates: http://vestacp.com/docs/#template-description
Sorry for my bad explanation, Its getting late here.
I hope this helps you in some way,
Thanks Liam.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: about Nginx as Reverse proxy
Thanks M1LIAM,
I appreciate the answers.
Pardon my ignorance, I couldn't find how to PROVIDE the Template to Vesta CP. Is it a Command line parameter to install script ? or something that can be configured after the installation??
Can we change the "Mode" later down the line if we wish to?
And with the "hosting" template, you mean Nginx -> hosting right ? As you described, I guess the reverse proxy setup would work best from the cached resources.
some pointers or screenshots would really help...wasn't straight from the docs I've ready
I appreciate the answers.
Pardon my ignorance, I couldn't find how to PROVIDE the Template to Vesta CP. Is it a Command line parameter to install script ? or something that can be configured after the installation??
Can we change the "Mode" later down the line if we wish to?
And with the "hosting" template, you mean Nginx -> hosting right ? As you described, I guess the reverse proxy setup would work best from the cached resources.
some pointers or screenshots would really help...wasn't straight from the docs I've ready
Re: about Nginx as Reverse proxy
Hi mehargags,
You can apply this template from the Vesta Web Control Panel. once you login in VestaCP go to "Web" Pick which domain you would like to make changes to and click edit. In the first half of the page there will be a dropdown box labeled "Nginx Template" From here you can choose your preferred template.Also yes, this can be changed at anytime. ( You may have to do this from the admin Acc )
Yes, Nginx does the caching, So when someone loads a page it is loading a cached copy from Nginx.
If you still need some help with this I am happy to show you around VestaCP via the likes of TeamV or ScreenLeap.
Unfortunatly I am unable to provide you with screenshots at this moment
Thanks, Liam
You can apply this template from the Vesta Web Control Panel. once you login in VestaCP go to "Web" Pick which domain you would like to make changes to and click edit. In the first half of the page there will be a dropdown box labeled "Nginx Template" From here you can choose your preferred template.Also yes, this can be changed at anytime. ( You may have to do this from the admin Acc )
Yes, Nginx does the caching, So when someone loads a page it is loading a cached copy from Nginx.
If you still need some help with this I am happy to show you around VestaCP via the likes of TeamV or ScreenLeap.
Unfortunatly I am unable to provide you with screenshots at this moment
Thanks, Liam
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: about Nginx as Reverse proxy
thanks M1
I appreciate, and will bug your for a remote session if required.
abt the Template, so the template applies to "per domain" and not to the whole VestaCP installation... right ?
I have my website configured as -- Apache Template "default" /nginx Template -- "hosting" -- is that going to run fine for the requirements stated above ?
I appreciate, and will bug your for a remote session if required.
abt the Template, so the template applies to "per domain" and not to the whole VestaCP installation... right ?
I have my website configured as -- Apache Template "default" /nginx Template -- "hosting" -- is that going to run fine for the requirements stated above ?
Re: about Nginx as Reverse proxy
I would say so, and if you need to change the template to caching for when your server starts getting hit hard, just go ahead and change it in the web domain configuration page.