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

about Nginx as Reverse proxy

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
about Nginx as Reverse proxy
  • Quote

Post by mehargags » Sun Sep 07, 2014 8:45 pm

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
Top

M1LIAM
Posts: 15
Joined: Tue Jun 17, 2014 8:39 am

Re: about Nginx as Reverse proxy
  • Quote

Post by M1LIAM » Wed Sep 10, 2014 12:01 pm

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: about Nginx as Reverse proxy
  • Quote

Post by mehargags » Wed Sep 10, 2014 8:11 pm

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
Top

M1LIAM
Posts: 15
Joined: Tue Jun 17, 2014 8:39 am

Re: about Nginx as Reverse proxy
  • Quote

Post by M1LIAM » Wed Sep 10, 2014 9:37 pm

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
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: about Nginx as Reverse proxy
  • Quote

Post by mehargags » Thu Sep 11, 2014 1:01 pm

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 ?
Top

F41L
Posts: 14
Joined: Sat Oct 11, 2014 7:50 pm

Re: about Nginx as Reverse proxy
  • Quote

Post by F41L » Sat Oct 11, 2014 9:11 pm

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.
Top


Post Reply
  • Print view

6 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
 

 

Login  •  Register

I forgot my password