# NGINX reason not too?



## Solaris17 (May 30, 2016)

I just watched a presentation on NGINX from a speaker at IPC and I absolutely loved what I saw. I run Apache now and it probably wouldn't be too detrimental for me to bring the web server down for a few days to migrate things. 

Is there a reason NOT to move to NGINX from Apache? Are there glaring issues that are 'expected' I should watch out for?


----------



## R-T-B (May 30, 2016)

I've used nginx for years.  No complaints and performance is far superior on static content, slightly better to equal on dynamic/php content.

It's kind of a pain to learn it's config file.  But that's really the only drawback IMO.


----------



## Solaris17 (May 30, 2016)

R-T-B said:


> I've used nginx for years.  No complaints and performance is far superior on static content, slightly better to equal on dynamic/php content.
> 
> It's kind of a pain to learn it's config file.  But that's really the only drawback IMO.



Thank you this is useful! I was a little worried dynamic content would suffer alot I am ok with it NOT having a performance boost with Dynamic content but I would be sad if I took a performance hit.


----------



## R-T-B (May 30, 2016)

Solaris17 said:


> Thank you this is useful! I was a little worried dynamic content would suffer alot I am ok with it NOT having a performance boost with Dynamic content but I would be sad if I took a performance hit.



In my experience, it likes a bit more ram for dynamic content, but I have not seen a performance hit.  But I don't run a huge website, so take it with a grain of salt.


----------



## Solaris17 (May 30, 2016)

Have you seen any performance issues with the separate worker threads? or stability issues? In theory it sounds fantastic like separate process threads for chrome tabs, but I know in some instances more isn't always better. Though it is  a factor I am really excited about.


----------



## W1zzard (May 31, 2016)

Some learning curve because no more .htaccess and no more mod_php, so you have to to setup php-fpm.

Also not sure about your site traffic, might make absolutely no difference in the end and just cost time to setup.

Otherwise nginx is great, we use it a lot.


----------



## truth teller (May 31, 2016)

last time i checked (last year?), apache was still "better" (less resources, faster throughput with less cpu usage) at serving static resources than nginx, that might have changed by now
still, even if most of the content you serve is dynamic, nginx is great (the nginx.conf at first might look kinda weird, but i like it more than the htaccess alternative)


----------



## Solaris17 (May 31, 2016)

W1zzard said:


> Some learning curve because no more .htaccess and no more mod_php, so you have to to setup php-fpm.
> 
> Also not sure about your site traffic, might make absolutely no difference in the end and just cost time to setup.
> 
> Otherwise nginx is great, we use it a lot.



Would you say its steep? I would be trying this in the lab first. if its not to terrible I would like to take the time to do it. Load balancing looks very simple in Nginx


----------



## R-T-B (May 31, 2016)

truth teller said:


> last time i checked (last year?), apache was still "better" (less resources, faster throughput with less cpu usage) at serving static resources than nginx, that might have changed by now



I think that depends largely on the load.  For low loads apache will always appear better at static content.  But it scales horribly, whereas nginx does so amazingly well.



Solaris17 said:


> Would you say its steep? I would be trying this in the lab first. if its not to terrible I would like to take the time to do it. Load balancing looks very simple in Nginx



If the applications you have aren't setup with nginx configigs, the lack of .htaccess can be a major PITA.  I still run into that sometimes and it's kinda hard to fight with at times even for someone who has run with nginx for a while.  That's my honest assessment.

Keep in mind, officially my job description does not even allow me to touch the webserver at work so I'm not technically that skilled.  Doesn't mean I haven't, as I have a pretty diverse skillset and for lack of a better term, our actual web admin is a moron.


----------



## truth teller (May 31, 2016)

Solaris17 said:


> Would you say its steep? I would be trying this in the lab first. if its not to terrible I would like to take the time to do it. Load balancing looks very simple in Nginx


not at all, you will get the hang of it in a couple of minutes, it just seems more expressive (and is)


----------



## Aquinus (May 31, 2016)

At work we use Nginx for HTTPS termination and as a load balancer/reverse HTTP proxy. Nginx is far more capable at handling large numbers of connections compared to Apache. I can't say much for its PHP-FPM performance though but for what we use it for, it's phenomenal.


Solaris17 said:


> Would you say its steep? I would be trying this in the lab first. if its not to terrible I would like to take the time to do it. Load balancing looks very simple in Nginx


If you're used to configuring Apache confs by hand, I doubt it will feel steep... just maybe a little different but, strangely the same.


----------



## Solaris17 (May 31, 2016)

Aquinus said:


> At work we use Nginx for HTTPS termination and as a load balancer/reverse HTTP proxy. Nginx is far more capable at handling large numbers of connections compared to Apache. I can't say much for its PHP-FPM performance though but for what we use it for, it's phenomenal.
> 
> If you're used to configuring Apache confs by hand, I doubt it will feel steep... just maybe a little different but, strangely the same.



I actually did alot of my apache configs by hand. So this is good information.


----------

