News for hackers. Stuff that matters.
Re:Nginx has replaced Apache as the most used web server amo... by saltcod on Monday May 26, 2014 @08:32AM (#7799460)
Any opinions on Nginx being more difficult to setup/run than Apache? I'm considering switching, but I really have enough overhead to deal with!
Re:Nginx has replaced Apache as the most used web server amo... by mfjordvald on Monday May 26, 2014 @08:48AM (#7799514)
I'm very biased on this subject but I find the configuration file to be far more simple. The lack of .htaccess support is also a blessing in disguise as everything is in explicitly defined locations.
Re:Nginx has replaced Apache as the most used web server amo... by Theodores on Monday May 26, 2014 @08:38AM (#7799472)
Just give it a go. Remember you can set it up to run on another port, e.g. 81, 8080 etc. so you can get it working whilst still having Apache up and running on your site.

For popular CMS applications you can normally find some helpful .conf file to get you started.

You will also need to setup php-fpm if you are running a PHP flavoured 'LAMP' stack.

Re:Nginx has replaced Apache as the most used web server amo... by marceldegraaf on Monday May 26, 2014 @08:44AM (#7799495)
I find nginx way easier to set up than Apache, at least for "standard" (PHP, Ruby/Rails, static) applications and sites. The config file syntax is cleaner than Apache's, and setup is easy (through your favourite package manager). The memory footprint of nginx is also smaller than that of Apache (at least with default settings).
Re:Nginx has replaced Apache as the most used web server amo... by saltcod on Monday May 26, 2014 @08:50AM (#7799521)
Cool! I never thought of that!

Will it be noticeably faster than my current (tuned) Apache setup?

Re:Nginx has replaced Apache as the most used web server amo... by Theodores on Monday May 26, 2014 @01:50PM (#7800746)
Nginx is faster, however, it is possible to get Apache to be quick and it is possible to make nginx slow (I think 'if' statements are to be avoided in the config).

However, as well as speed there is also the amount of load that can be sustained. Nginx wins on this front as well as with speed.

As mentioned, run it on another port and see for yourself. When you are happy with it turn off apache on the chkconfig, set nginx to the other port, stop apache and run nginx -s reload to swap over the port. Yep, you can get the whole thing installed, tested and deployed without reboot or downtime!

Re:Nginx has replaced Apache as the most used web server amo... by mercer on Monday May 26, 2014 @08:53AM (#7799538)
If you have anything to do with Drupal (and possibly Wordpress) as well, you might run into issues.

At least concerning Drupal, a lot of plugins require changes to the .htaccess file(s), and at least when I tried, this was hard to translate to nginx.

But there are some .htaccess to nginx converters, so I'm not sure if that is a big issue at this time.

And as others have said, you might find the nginx approach to be much more comfortable than .htaccess. I did.

Re:Nginx has replaced Apache as the most used web server amo... by vegardx on Monday May 26, 2014 @09:24AM (#7799626)
Drupal works flawlessly with Nginx[1], and there is little magic involved. You even have good handling of private files, permission and such.

There's only a few modules that require changes to the default ".htaccess" (basically just overriding Apache default logic) of Drupal, like the module Boost. But since Nginx can serve as both a application server and reverse proxy, you can have the best of both worlds, without doing hack-y things like Boost, which basically generates a lot of static files.

You don't want to use those converters, as they usually rely heavily on ifs, which is a bad thing, when things normally can be handled pretty well with the "try_files"-directive.

[1] I've been using it in my stack for a couple of dozen Drupal sites for about two years now.

Re:Nginx has replaced Apache as the most used web server amo... by mercer on Monday May 26, 2014 @01:30PM (#7800662)
Thanks for the information! I've mostly moved away from Drupal, but I still maintain a number of sites for some clients. Good to know a move to nginx is an option.
Re:Nginx has replaced Apache as the most used web server amo... by Walkman on Monday May 26, 2014 @12:22PM (#7800378)
Way easier to configure than apache!