MyBB Community Forums

Full Version: Newbie to VPS - Few Questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm sorry for the thread title. I couldn't think a good name Wink

Anyway, I've had a VPS before. But I lack the amount of experience to know exactly what's going on at all times. I usually use good ol google. However I wanted to start a thread and get some direct feedback to my problems with a community I know and trust.

I purchased a cheap 512mb Xen VPS from Virpus for a month to host personal projects on. No high traffic websites, just something for me to use and play with. So far I've installed MySQL, phpMyAdmin, httpd(if that's apache? Quite frankly I forget.), vsftpd, and the php extensions for the httpd or whatever.

What's a good estimate on ram usage? I'm almost using all 500mb which surprises me in a way. I must not be doing something right, and I'd like to know how I can further optimize my settings. Essentially all I need is a simple FTP service and a light webserver.

For some reason I thought that I used to host basically the same thing on a small 256mb VPS from hexxeh.net when he hosted, but maybe not.

Thanks guys,
-Lane
What OS? That will affect how much RAM gets used.

Apache (httpd) can use a fair bit of RAM too. My VPS (Well, my web one) is running at ~750MB at the moment (IIS, which is about as memory hungry as Apache). Mail is sitting at 3.9GB-4GB frequently (but it's exchange)
Use the "top" command to see which services are hogging resources. In this case, it's almost surely Apache. If you're looking for a light web server, look into Nginx. However, it will require a manual installation.
Ah my bad guys. It's running Centos 6 at the moment. I didn't choose the software for any particular reason. I did choose 32 bit because it's only running 512mb of ram thus no need for 64 bit obviously.

Looking into Nginx atm. Also I'm not entirely sure what you meant by manual installation but I've installed everything else so far manually so it shouldn't be too big of a deal. What about lighttpd? I believe i've used it before on a smaller ram configuration.
(2013-10-26, 02:33 AM)Mini` Wrote: [ -> ]Ah my bad guys. It's running Centos 6 at the moment. I didn't choose the software for any particular reason. I did choose 32 bit because it's only running 512mb of ram thus no need for 64 bit obviously.

Looking into Nginx atm. Also I'm not entirely sure what you meant by manual installation but I've installed everything else so far manually so it shouldn't be too big of a deal. What about lighttpd? I believe i've used it before on a smaller ram configuration.
It requires you manually setting up php5-fpm, and configuring server blocks, where to Apache comes with it all preinstalled, and content is usually just added to /var/www. I've never used lighthttpd, but I do use Nginx, and I can say it's very light.
Definitely considering giving Nginx a shot then. I've read a few installations and it seems somewhat straightforward. Plus it will keep me busy for a bit. Thank you sir.

Is there a specific OS you recommend?
(2013-10-26, 02:42 AM)Mini` Wrote: [ -> ]Definitely considering giving Nginx a shot then. I've read a few installations and it seems somewhat straightforward. Plus it will keep me busy for a bit. Thank you sir.

Is there a specific OS you recommend?
Not a problem.
As to operating system, I prefer Debian myself but there is really no going wrong with both CentOS and Debian. As to differences, there are many articles on Google about it Toungue. Most will tell you, that it's a personal preference, and the main difference is in the package management system. Debian does use a bit less memory than CentOS, however I'm not sure exactly how much and if it would be worth switching to Debian from CentOS for.
I am an Nginx user, and have a surprisingly modest VPS for my website as well. I also host a lot of ajax intensive applications (such as chat rooms) on the same server, and my RAM usage is usually around 200-300MB with no problems whatsoever. (I'm surprised, to be honest. Chat rooms are generally considered to be very resource intensive, but with a good configuration, they can be surprisingly lightweight. Toungue )

The only thing I've found to be frustrating about Nginx is that .htaccess files don't work, so I have to redo all of the rewrites manually into the config file, then restart Nginx. It's not difficult once you get the hang of it, but I really do wish they would come up with some sort of alternative to save some time for the end user.

Other than that, I haven't really had any issues. Nginx is extremely fast, and is surprisingly conservative of resources. php5-fpm is also not difficult to set up, and I have had no issues with it. As a fellow VPS user, I would strongly recommend it. Big Grin
(2013-10-26, 03:01 AM)Darth Apple Wrote: [ -> ]I am an Nginx user, and have a surprisingly modest VPS for my website as well. I also host a lot of ajax intensive applications (such as chat rooms) on the same server, and my RAM usage is usually around 200-300MB with no problems whatsoever. (I'm surprised, to be honest. Chat rooms are generally considered to be very resource intensive, but with a good configuration, they can be surprisingly lightweight. Toungue )

The only thing I've found to be frustrating about Nginx is that .htaccess files don't work, so I have to redo all of the rewrites manually into the config file, then restart Nginx. It's not difficult once you get the hang of it, but I really do wish they would come up with some sort of alternative to save some time for the end user.

Other than that, I haven't really had any issues. Nginx is extremely fast, and is surprisingly conservative of resources. php5-fpm is also not difficult to set up, and I have had no issues with it. As a fellow VPS user, I would strongly recommend it. Big Grin
Yep, about the speed. However, I don't agree about .htaccess files. I like my configuration in one file, in the backend. I find it easier to implement changes than Apache. The main tip I have is to try to put your php configuration into one file, if you plan on having more than one file, for example I put my php configuration in the root of nginx (/etc/nginx) as
location ~ \.php$ {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
        include fastcgi_params;
        try_files  $uri =404;
                  }


And I use a mybb.conf, I add anything here I want to be for anything MyBB related I host. In this case, I am making any .php files in my /uploads folder to return a 403 error, as there will never be a php file there. This is so that if a malicious file somehow ends up there, it cannot be executed by PHP.
location ~ /inc/ { deny all; }
location /uploads { location ~ \.php$ { return 403;} }
location /images {  location ~ \.php$ { return 403;} }

And a minimize.conf to minimize useless stuff in access logs.
ocation ~*  \.(jpg|jpeg|png|gif|ico|css|js)$ { access_log off; }
location /pm.php { include php.conf; access_log off; }

By putting all of that configuration into one file, that can be used on any site I host, it makes setup MUST faster, as all I have to do is include these files
include php.conf
include minimize.conf, etc Toungue
You can ask for help regarding setup here Wink
I wouldn't say Debian uses less RAM than CentOS. It all depends on what services you have running. My minimalist CentOS 6.3 install was using only 53MB of RAM w/out httpd running. Sadly something did change in 6.4 that increased it to 59MB, but I'm not sure what as yet. I don't care enough to find out since I have 2GB of RAM on it.
Pages: 1 2