Server OS and Web Server?

ShadowdareShadowdare Member
edited July 2012 in Internet & Media
I just ordered a VPS and I have the choice between CentOS, Debian, Fedora, or Ubuntu. Which one do you guys think I should run? I think you guys have more experience with VPS/dedicated web servers than I do.

Also, I'm wondering if Apache, Nginx, or Lighttpd would be the best choice for me in terms of fast load times, low memory and CPU usage. I'll be running WordPress and Vanilla forums. @Lincoln, which one does Icrontic run on? Which one do you guys recommend?

Comments

  • LincLinc Owner Detroit Icrontian
    edited July 2012
    We run on Apache and I'm very satisfied with it. It runs a huge percentage of the Internet, and you'll find a ton of support out there for it. I'm pretty damn good at configuring it, especially mod_rewrite rules. That said, there is a significant learning curve.

    If I was going to move to another system, nginx is gaining a ton of momentum for its scalability and ease of configuring for more complex tasks. VanillaForums.com (my employer) runs nginx because it makes load balancing a snap. However, I doubt it would be possible or feasible for me to translate our complex URL rewrite rules into nginx - the mod_rewrite module for Apache is pretty incredible. //EDIT: A lot of open source software comes with Apache support out-of-the-box, like WordPress. You'd need to tinker a bit to get it working in nginx.

    Lighttpd - my only experience with this is the bugs it causes for being almost-but-not-quite like Apache. I have no desire to investigate it.
  • Straight_ManStraight_Man Geeky, in my own way Naples, FL Icrontian
    edited July 2012
    For WordPress:
    PHP 5.2.12 or up will suffice;
    Apache probably (that is what my simple shared server WordPress site runs on);
    MySQL is needed for WordPress database.

    Lincoln knows about Vanilla, but you can get Vanilla hosted at VanillaForums.com. I recommend that, and think Lincoln would also for a Vanilla forum where someone wants the latest software. I had a tiny Vanilla forum there for two months and they were quite responsive to my needs, but I did not do a good job of building interest for my tiny embryo of a forum and had a limited income so I cancelled the hosting.
  • LincLinc Owner Detroit Icrontian
    edited July 2012
    Personally, I favor CentOS. Have always run on it and have zero desire to change that. It's essentially Red Hat without the branding or support. It runs a disproportionate share of webservers worldwide - it's its primary task.

    I hear Debian will make you crazy unless you already know it. It's not noob-friendly. To Fedora I say "why go prosumer when you can just get CentOS?" Ubuntu I hear is fine, I just have no desire to start over and CentOS is too good a fit to bother.
  • LincLinc Owner Detroit Icrontian
    For a traditional LAMP stack, CentOS + Apache + MySQL + PHP will buy you maximum compatibility across the board and maximum documentation and resources. Are there times to substitute out components? Yup. But if you're just starting out, I'd go with the defaults to learn and then you can make informed judgements after you have some experience administrating.
  • ardichokeardichoke Icrontian
    Personally, I'm a fan of Debian... though it seems a lot of the hosting world runs on CentOS. As for webserver, Apache. Definitely Apache. Using Nginx as a reverse caching proxy can be really nice to handle spikes in traffic.
  • Straight_ManStraight_Man Geeky, in my own way Naples, FL Icrontian
    Lincoln said:

    Personally, I favor CentOS. Have always run on it and have zero desire to change that. It's essentially Red Hat without the branding or support. It runs a disproportionate share of webservers worldwide - it's its primary task.

    I hear Debian will make you crazy unless you already know it. It's not noob-friendly. To Fedora I say "why go prosumer when you can just get CentOS?" Ubuntu I hear is fine, I just have no desire to start over and CentOS is too good a fit to bother.

    CentOS is a slower major version cycle releaser. This is very good for servers with their more stable hardware configurations.

    For workstations, I would say Fedora with its 6-7 month major version cycle because workstation hardware updates a lot as folks try to do more and more advanced tasks with them and workstation Application and GUI software gets patched a lot. I have no server here, so I run Fedora. Ran RedHat Workstation way back when. Ubuntu is a fast cycling distribution of Linux also, and from what I understand it is a bit harder to set up for Server use than CentOS.

    But CentOS and RedHat have a lot of the web server hosting market right now-- RedHat for Enterprise use, a lot, and CentOS for non-Enterprise use more due to the apps bundled with each and autoinstalled.

  • Thanks, everyone. :D I choose CentOS and Apache because they're the easiest for me to use and configure. I'll consider using Nginx as a reverse caching proxy in the future.

    I do have a problem with the Apache processes though. Either they're using too much memory. Six httpd processes are running with 22.9% out of 1GB RAM used. Is this normal?
  • Straight_ManStraight_Man Geeky, in my own way Naples, FL Icrontian
    Are you running a GUI??? If not, that is probably httpd defaulted work+cache space. httpd reserves a work buffer area per instance of itself. Modern httpd reserves more of a cache space than older httpd, because folks want to feed more graphics these days. Linux reports work buffers as part of process calling them, unlike Windows.

    Daemons are processes to Linux. I do not understand why you have 6 instances of httpd running, though, unless you are also serving web sites or hosting ftp processes. Folding only would use 2 instances of httpd, and then only sometimes(when uploading and downloading at once). Modern folding client for Linux uses only one http flow per instance, and can multithread within that instance to fold one WU at a time faster than 4-5 instances would if they did not multithread probably.

    If you are running a GUI, Fedora Linux with GUI wants 2 GB these days to handle work space for applications and things like that. Fedora says minimum one GB, recommended 2 GB for Fedora 17 (current version). Folding will grab space also to work, for itself.
  • I'm not running a GUI. I'm guessing that my problem is related to httpd.conf prefork or worker settings. If so, is there anything I should change with my config below?

    StartServers 1
    MinSpareServers 1
    MaxSpareServers 5
    ServerLimit 16
    MaxClients 16
    MaxRequestsPerChild 0
    ListenBacklog 100



    StartServers 1
    MaxClients 10
    MinSpareThreads 1
    MaxSpareThreads 4
    ThreadsPerChild 25
    MaxRequestsPerChild 0
  • Straight_ManStraight_Man Geeky, in my own way Naples, FL Icrontian
    If you are not serving web sites, or virtual ftping through httpd(which folding does), some bugs and security things also apply which get very technical. It is possible to get multiple sessions of httpd from people remotely hacking onto your computer as well.

    If you are serving web sites or ftp, the min and max spare servers settings control how many instances more than one of httpd Apache will call for at need. You can set them to 1 for both spare server settings if you want only Folding to work. Then Apache and the rest of Linux core should only open two http pipes at max from Apache calls, and allow your browser if any to use one while folding is working. If you Torrent, see your Torrent peer client/server setup to limit how much it virtual ftps if it does.
  • TushonTushon I'm scared, Coach Alexandria, VA Icrontian
    From setup to hacking in 3 posts. I'll leave this to more knowledgeable people, but I really ... really doubt that "remotely hacking" is any component of this.
  • Decent guide on optimizing httpd memory usage with Apache:
    https://www.virtacoresupport.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=102

    Also, make sure you set the timeout setting on httpd.conf to something reasonable (keeping in mind what the slowest request or webpage may be to load) so that you don't end up with left open sessions that aren't actually being used.

    That's all I can think of really. Good luck!
  • Tried my best with optimizing the httpd config, but it still seemed to use too much resources.

    I switched to Nginx (by itself; not as a proxy) and PHP-FPM and now everything's much faster and there are less processes along with lower memory usage. The learning curve wasn't as steep as I thought it'd be. It's very easy to set up and to convert some htaccess code over.
  • BasilBasil Nubcaek England Icrontian
    Gotta love nginx, my 64MB VPS chuggs along nicely with it.
Sign In or Register to comment.