LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-31-2014, 11:21 AM   #1
tr3x
LQ Newbie
 
Registered: Jan 2014
Location: Russia / Saint-Petersburg
Distribution: fedora
Posts: 3

Rep: Reputation: Disabled
Question Nginx+Apache or nginx alone


Hello LQ users. This is my fist LQ post & topic.

I want to ask you about nginx+apache web-server scheme.
Is is nessesary to make such configuration? Or single nginx + php in cgi mode will be the same?

Maybe you can show some comparing statistics of Nginx+apache and nginx alone.
 
Old 01-31-2014, 12:29 PM   #2
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Nginx + lighttpd is a more common approach...

Statistics are easy to find on Google, but you'll soon realize that it is more a matter of type of content provided and, well, a matter of (concurrent) connections..

If you're unsure, it's best to choose one of these two (nginx or lighttpd) and use them along with php-fpm ... Or just stick with Apache (maybe put nginx up for a CDN if you intend to run one)

But this is just my opinion, based on passed experiences or tests that could have absolutely no relevance to your use case.
 
Old 02-01-2014, 02:45 AM   #3
tr3x
LQ Newbie
 
Registered: Jan 2014
Location: Russia / Saint-Petersburg
Distribution: fedora
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Smokey_justme View Post
Nginx + lighttpd is a more common approach...

Statistics are easy to find on Google

i've tried, can you help me with this, please?

i see a lot of tests nginx+apache VS apache, but i didnt see nginx+apache VS ngnix only
 
Old 02-01-2014, 05:45 AM   #4
vl23
Member
 
Registered: Mar 2009
Posts: 125

Rep: Reputation: 8
Performance-wise nginx is superior to Apache, according to some statistics I've seen it even outperforms Apache where parsing PHP is concerned(but static content is IIRC where it really pwns Apache).
Why don't you set it up and do a few benchmarks with ab and similar tools, then decide.
 
1 members found this post helpful.
Old 02-01-2014, 01:24 PM   #5
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
I don't think any "nginx + apache VS nginx" (or "nginx +apache VS apache", or any multiple servers vs single server) statistics do any good or give any kind of trustworthy information. The reason is that you can have nginx + apache set up in a million ways (well, not quite, in about three or four ways) and performance wise it all boils down to what it serves.. That's why this kind of stats aren't done frequently (if at all).

You should take a look of what each web server does best and fit it to your needs.. There are setups of nginx proxying to apache for php (which, personally I don't like), setups where nginx is used as a load balancer and apache (or ligthttpd, or even nginx) as the actual servers, setups of nginx serving CDN and apache (or another server) serving anything else, or even more complex setups.

So you see, each setup would give another set of stats, again, depending on the content served and connections... The simple "Hello world.php" would not be of any values in this cases.. The one thing that is clear in all stats (if you didn't yet see this) is that Apache needs quite a bit of extra memory to handle many concurrent connections (which is because of it's design).. That's it, for all the rest you should really do your own testing (like vl23 already suggested) on your one application.. Or compare them server vs server (which, like I said, are easy to find on Google) on a category that matters to you.

Anyway, I've searched for some discussions that cover "nginx as a reverse proxy for apahce/mod_php VS nginx + php-fpm":
https://groups.drupal.org/node/27082
http://serverfault.com/questions/298...oxy-for-apache

I don't see anything new in there, but you know, maybe you would like to browse over them...

Hope it help..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nginx/1.4.1 '/etc/nginx/sites-available/default' missing Jalalabee Linux - Newbie 0 06-05-2013 07:44 AM
nginx + php-fpm and nginx modules fantasygoat Linux - Server 0 06-09-2011 12:21 PM
LXer: Nginx+Varnish compared to Nginx LXer Syndicated Linux News 0 04-27-2011 02:30 PM
Nginx experts help me-problem when using Nginx php-fpm !!! HuMan-BiEnG Linux - Server 2 04-17-2011 02:30 PM
NGINX with PHP-FPM vis NGINX with Spawn-FCGI WhisperiN Linux - Server 1 03-15-2011 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration