Hello everyone, I recently decided to move away from shared hosting and step into waters of VPS. I have many doubts and things I’m not sure how to do. I have no experience in the fields of maintaining server of my own, but given the community DO has and number of helpful tutorials, I’m feeling really good about this. Ofc, I don’t think I will make it without your help.
Current website has in average 190k page views and 58k visits per month. No logged in users.
So, which plan would you suggest me? I’m pretty sure Apache will eat 512MB RAM plan easily. Could I get away with 1GB ?
What stack do you recommend? LAMP or LEMP? And why? I’m aware that NGINX consumes less resources, but I keep stumbling upon “nginx is good for static content”. What about dynamic? Why do I need FastCGI with NGINX and PHP? I know how to configure virtual hosts on Apache, but it looks confusing on NGINX. Also, as I pointed out, I’m relying on .htaccess, if I pick NGINX, I’ll have to learn and translate rules. And setting default error pages in NGINX? I’m also aware that NGINX increases my chances to get away with 1GB :P
What OS do you recommend and why? Ubuntu, CentOS?
I don’t have to explain why I am especially afraid of deploying application to self managed server. Security is really important or I’m in big trouble. What measures do I have to take after I install the stack? Or what else should I install to secure my http and mysql servers? Any suggestions how to optimize them as well?
What about server side caching? Do I need it? Does MySQL have it’s own caching capabilities or do I have to install something?
I’m aware that maintaining own mail server is not a good idea unless you’re experienced, so I’ll just use shared hosting for that.
I know this is a lot of questions, and I will be very grateful on any kind of help. Pointing out to related tutorials is also very welcomed.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Thanks, Kamal, I appreciate it :)
<blockquote>1) So, which plan would you suggest me? I’m pretty sure Apache will eat 512MB RAM plan easily. Could I get away with 1GB ?</blockquote>Apache uses <strong>tons</strong> of memory, especially when there is a high amount of concurrent users. I would suggest going with nginx instead. <br><blockquote>2) What stack do you recommend? LAMP or LEMP? And why? I’m aware that NGINX consumes less resources, but I keep stumbling upon “nginx is good for static content”. What about dynamic? Why do I need FastCGI with NGINX and PHP? I know how to configure virtual hosts on Apache, but it looks confusing on NGINX. Also, as I pointed out, I’m relying on .htaccess, if I pick NGINX, I’ll have to learn and translate rules. And setting default error pages in NGINX? I’m also aware that NGINX increases my chances to get away with 1GB :P</blockquote><strong>but I keep stumbling upon “nginx is good for static content”.</strong>Nginx <em>is</em> good for static content, but not just for static content. It actually serves dynamic pages faster than Apache. <br><strong>Also, as I pointed out, I’m relying on .htaccess, if I pick NGINX, I’ll have to learn and translate rules. </strong>Check out <a href=“https://www.digitalocean.com/community/articles/how-to-migrate-from-an-apache-web-server-to-nginx-on-an-ubuntu-vps”>https://www.digitalocean.com/community/articles/how-to-migrate-from-an-apache-web-server-to-nginx-on-an-ubuntu-vps</a>. <br><blockquote>3) What OS do you recommend and why? Ubuntu, CentOS?</blockquote>I personally use Ubuntu Server. <br><blockquote>4) I don’t have to explain why I am especially afraid of deploying application to self managed server. Security is really important or I’m in big trouble. What measures do I have to take after I install the stack? Or what else should I install to secure my http and mysql servers? Any suggestions how to optimize them as well?</blockquote>Check out <a href=“https://www.digitalocean.com/community/community_tags/security”>https://www.digitalocean.com/community/community_tags/security</a>. <br><blockquote>5) What about server side caching? Do I need it? Does MySQL have it’s own caching capabilities or do I have to install something?</blockquote>Try starting off without cache as to not overengineer it and see whether you actually <strong>need</strong> it or not. <br> <br>I hope that helps! :]
Hi, thanks for responding. I’m not interested in Wordpress, as my client has some “special” requirements regarding backend. Anyway, thanks for suggesting a plan and OS. <br> <br>Wish you all the best.
well, as you know this is an endless talk and may never be summarized in one or two lines. <br> <br>you have a lot of choices to go for, but let me start with the web server. <br> <br>Yes, NGINX is a little faster than Apache. what make use of it really if Nginx+php-fpm is used to have super speed. also you can go for Apache+php-fpm which is really good, too. I believe that Apache consume more RAM in his case compared to Nginx. <br> <br>I guess WordPress is a very good choice for you because it has a lot of plugins and easy to use. <br> <br>Ubuntu is considered the most suitable OS for WP. <br> <br>I guess all others questions have the answers under Ubuntu and WordPress work. <br> <br>you can try 1GB plan to smooth your work since you have a lot of visits every month. <br> <br>Good Luck!!