Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Why Nginx isn't currently suited for shared hosting
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Why Nginx isn't currently suited for shared hosting

taiprestaipres Member
edited June 2012 in General

"The biggest headache for a lot of people is that they no longer have access to .htaccess. There is no way to change your Nginx configuration without issuing a reload command to Nginx. The effect can be simulated by using include directives in the main Nginx configuration file, but any change will not take effect until the configuration file has been reloaded. This is also the primary reason why Nginx is not very suited for shared hosting, not even in a situation where you reverse proxy to Apache."

http://blog.martinfjordvald.com/2011/02/nginx-primer-2-from-apache-to-nginx/


I found this to be interesting, the solution would not just be adding the ability to dynamically load as I initally thought, but one would have to write delegation code too, so that 1 user couldn't breach the entire ship themselves with a bad/shady config.

Comments

  • beardbeard Member

    .htaccess is crap

    Just hire somebody from Fiverr or some rentacoder site to convert your .htaccess to nginx

  • @beard said: .htaccess is crap

    Just hire somebody from Fiverr or some rentacoder site to convert your .htaccess to nginx

    I have no issues with my nginx config, what i'm saying is for the shared hosts on here who are interested in replacing apache with nginx(as apache can use up to triple the mem) nginx currently has a serious roadblock with the having to restart the server with config changes.

  • KairusKairus Member

    Cool. I think pretty much everyone knows that nginx isn't a drop-in replacement for apache in situations like this. Too bad litespeed is priced too high, otherwise it would really take over the shared hosting market.

  • miTgiBmiTgiB Member

    @taipres said: nginx currently has a serious roadblock

    Isn't it more than a single roadblock? Didn't I see recently that apache 2.4 is so improved that it outpreforms nginx on many of the benchmarks?

  • KairusKairus Member

    @miTgiB said: Didn't I see recently that apache 2.4 is so improved that it outpreforms nginx on many of the benchmarks?

    I think a more accurate benchmark needs to be done to be able to say that. Here's the only one I can find:

    http://mondotech.blogspot.com/2012/02/apache-24-vs-nginx-benchmark-showdown.html

  • @Kairus said: Cool. I think pretty much everyone knows that nginx isn't a drop-in replacement for apache in situations like this. Too bad litespeed is priced too high, otherwise it would really take over the shared hosting market.

    Well if you make the necessary patches to nginx then sell it to the shared hosting community and make buko bucks. Since it's licensed under BSD.

  • miTgiBmiTgiB Member

    @Kairus said: I think a more accurate benchmark needs to be done to be able to say that. Here's the only one I can find:

    Yes, I found that one as well, and it shows apache 2.4 only exceeded in php, which is pretty darn important for many. For a LEB, nginx still is clearly the better choice, but I see this as mostly a linux distro type argument, or religion for that matter, better to avoid it, too hot of a topic and nobody will be right.

  • taiprestaipres Member
    edited June 2012

    @miTgiB said: Yes, I found that one as well, and it shows apache 2.4 only exceeded in php, which is pretty darn important for many. For a LEB, nginx still is clearly the better choice, but I see this as mostly a linux distro type argument, or religion for that matter, better to avoid it, too hot of a topic and nobody will be right.

    When apache uses triple the memory, that's far more than a "Distro type" argument and shared costs i'm sure care about that too. Also the php speed thing sounds iffy because the guy didn't show his php-fpm config, which can knock out many processes at once and doesn't block like apache. Also don't see if he used apc on either, so this guy isn't giving many details.

  • KairusKairus Member

    @taipres said: so this guy isn't giving many details.

    Yeah, exactly why this benchmark isn't reliable. Someone in the community should do some benchmarks, I would but I only have one VPS right now and it wouldn't be reliable to run AB on the same VPS as I'm testing on.

  • miTgiBmiTgiB Member

    @taipres said: shared costs i'm sure care about that too.

    I think you typoed costs which should be hosts, assuming my guess is right, small hosts probably care more about memory than larger ones. My shared servers are all opteron 6128's with 16gb of ram, I don't care much about memory, there is plenty there. A friend with a very large forum I host uses a similar setup, e3-1230 with 16gb ram and runs apache. With these large setups, nginx still plays a useful role in reverse proxy setups and caching, but this is all just a preference debate in my view.

  • raindog308raindog308 Administrator, Veteran

    @beard said: .htaccess is crap

    What does that mean?

    It is very useful, particularly when you want non-privileged users to be able to set their own protections.

    I've wondered if there is a way to just source people's /home/something/nginx.conf files, but as I recall nginx will fail to start if one is bad. Really, it's not designed for shared hosting.

    Thanked by 1djvdorp
  • KairusKairus Member

    @raindog308 said: Really, it's not designed for shared hosting.

    It seems like it could be easily changed to be. Whether in a fork, a module, or in the main source tree.

  • DerekDerek Member

    @beard said: .htaccess is crap

    Just hire somebody from Fiverr or some rentacoder site to convert your .htaccess to nginx

    haha u funny

    Don't take a rocket scientist to figure out how to convert.

  • Aren't we have Nginxcp?

  • best dropin replacement for cPanel for me at least has been LiteSpeed

  • jarjar Patron Provider, Top Host, Veteran
    edited June 2012

    Quite frankly, I love apache. I hate it as well, but that's usually true of a lot of things. If you aren't upset by it's flaws, you aren't looking hard enough. I'm open to a lighter web server, but it's going to take a lot of convincing, I'm only 27 but I'm stubborn like an old man ;)

    Been eyeing the cpanel plugin, but my hardware was purchased with my current setup in mind, so I'm not in a situation where it's a big deal.

  • KuJoeKuJoe Member, Host Rep

    Why not use both? Our cPanel server runs Apache with a nginx proxy so we get the performance and security of nginx with the features and compatibility of Apache. :)

  • Yes, that was the same method I use when I still running Cpanel on a VPS :)

  • Apache with php-fpm instead of mod_php isnt that bad. Nginx is picky on starting with a faulty config

  • AmitzAmitz Member

    You cannot host porn with LiteSpeed. It's excluded by their TOS. Internet without porn? Phew! ;-)

  • raindog308raindog308 Administrator, Veteran

    +1 for LiteSpeed based on their TOS

    Thanked by 3djvdorp jar NateN34
  • PADPAD Member
    edited June 2012

    -1 for LiteSpeed based on their TOS

    I'm paying for access to your software, not your server...not your liability..not your risk.. you don't tell me what I can't host.

    And that's why I'm not paying them.

  • AmitzAmitz Member

    Indeed. That's why nginx is my choice. They do not tell me what I might host or not.

  • TazTaz Member

    Why no one talks about cherokeee server?

    Thanked by 1djvdorp
  • jarjar Patron Provider, Top Host, Veteran
    edited June 2012

    LiteSpeed looks promising, but the CPU limit, connection limit, and vhost limit on the free version seems quite unattractive. Unless, of course, I'm missing something. I'm also a bit confused on the licensing. By CPU is it referring to computer or actual CPU core? That'd run me $999/y if I'm reading it right.

  • TazTaz Member

    Cpu cores.

  • TazTaz Member

    There is a dirty trick. I used to do it when I was doing shared hosting. You can save upto 50%

Sign In or Register to comment.