SEOClerks

What is the difference between Apache and Nginx?



Write the reason you're deleting this FAQ

What is the difference between Apache and Nginx?

Hi everyone,

I have been using an Apache web server for ages and recently I saw a hosting company that offered Nginx web servers. They claimed that the Nginx web server is faster and more lightweight than Apache. I am thinking about changing web hosts and the hosting plan the web hosting company offered looks very good and I may consider switching over. What is the difference between Apache and Nginx?

I also know the LiteSpeed web server is faster than Apache but what is the difference between Nginx and LiteSpeed?

Out of the three, which one is the best?

Comments

Please login or sign up to leave a comment

Join
robertman11
Nginx is a LOT faster and much more efficient than Apache. Apache is good and very stable but requires a lot of resources meaning you'll need larger servers as your traffic grows. Nginx on the other hand can reduce your server load significantly. I'd opt for Nginx over Apache any day of the week.

Litespeed is a commercial web server software, unlike Nginx or Apache (both open source). Litespeed is fast, if not faster, than Nginx. It depends on which benchmarks you look at. I find that Litespeed is much more stable than Nginx since Nginx has a plethora of Bad Gateway issues that never seem to be resolvable and has commercial support backing it. Litespeed is also a drop in replacement for Apache meaning you do not have to rewrite your .htaccess files (Nginx is differently formatted and requires a rewrite). You should, theoretically, be able to install Litespeed over an existing Apache installation without any issues or errors.

Here is the order I'd chose: Litespeed > Nginx > Apache



Are you sure you want to delete this post?

ajlancer
Hi thanks for nice question and robertman11 also descrived well. I think main differenct between Apache and Nginx are Apache and Nginx each are open source web servers i.e. hypertext transfer protocol (HTTP) servers and can be used for static files or dynamic pages. they're needed for configuration to recognize the URLs requested by the users to route at right place. Main distinction between Apache and Nginx is in their way to handle traffic and connections. In Apache multi-processing modules (MPMs) are provided to handle the client request whereas in Nginx the connections and clients are handled by putting them in event loops wherever they're processed asynchronously. The usage of processor and memory is consistent in Nginx even at significant loads as compare to Apache.

Thanks by Ajlancer



Are you sure you want to delete this post?

EliteWriter
Apache and Nginx are both good, and in fact they are two of the most commonly used open source web servers. Together, they serve over 50% of online traffic. However, if I were to choose I would also agree that Nginx is overall better than Apache. It is indeed faster, and basically its request handling enables it to process more requests with less memory resources. As a result, when it comes to serving simple static information such as audio, images and media, it manages the load quite better than Apache.



Are you sure you want to delete this post?

postcd
Apache is more used which is better. Nginx is significantly faster and better serve more visitors at a time.



Are you sure you want to delete this post?

Order Now
Process Time: 0.055630207061768

Possible Duplicate queries found!
MatchCountSQLScript
SELECT * FROM `questions` as q JOIN categories_faq as c ON q.catid=c.CATID WHERE (q.status=1 OR (q.status=2 AND userid='') ) AND q.quesid='10272'1SELECT q.*, c.seo as CatSEO, c.name as CatName, c.parentid FROM `questions` as q JOIN categories_faq as c ON q.catid=c.CATID WHERE (q.status=1 OR (q.status=2 AND userid='') ) AND q.quesid='10272'

/opt/clerks-staging/docroot/viewfaq.php 496 () ()

SELECT * FROM seoclerks.members WHERE USERID='311920'1SELECT * FROM seoclerks.members WHERE USERID='311920'

/opt/clerks-staging/docroot/include/functions/includes/member.php 445 GetAllUserDetails() ()

SELECT * FROM seoclerks.members WHERE USERID=3119201SELECT googleplus_profile FROM seoclerks.members WHERE USERID=311920

/opt/clerks-staging/docroot/include/functions/main.php 16914 GetGooglePlusProfileFromId() ()

SELECT * FROM ratings_faq as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=10272 LIMIT 51SELECT m.username FROM ratings_faq as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=10272 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM answers a, seoclerks.members b WHERE a.quesid='10272' AND a.userid=b.USERID and b.status='1' AND a.status=1 ORDER BY a.combined_votes DESC, a.date_answered asc1SELECT a.answer, a.USERID, a.upvotes, a.downvotes, a.ansid, a.parentid, a.combined_votes, a.date_answered, b.username, b.userlevel, b.profilepicture FROM answers a, seoclerks.members b WHERE a.quesid='10272' AND a.userid=b.USERID and b.status='1' AND a.status=1 ORDER BY a.combined_votes DESC, a.date_answered asc

/opt/clerks-staging/docroot/viewfaq.php 1245 () ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=40313 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=40313 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=40327 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=40327 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=40338 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=40338 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

SELECT * FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=110155 LIMIT 51SELECT m.username FROM ratings_faqanswers as r, seoclerks.members as m WHERE r.USERID=m.USERID AND r.upvote=1 AND r.PID=110155 LIMIT 5

/opt/clerks-staging/docroot/include/functions/main.php 17159 GetVoters() ()

UPDATE questions SET total_views = total_views + 1 WHERE quesid='10272'1UPDATE questions SET total_views = total_views + 1 WHERE quesid='10272'

/opt/clerks-staging/docroot/include/functions/main.php 1765 update_Faqviewcount() ()

SELECT * FROM questions WHERE quesid!='10272' AND status='1' AND (question like '% difference Apache Nginx?%' OR question like '%difference%' OR question like '%Apache%' OR question like '%Nginx?%') -- ORDER BY RAND() LIMIT 151SELECT quesid, question, seo, userid FROM questions WHERE quesid!='10272' AND status='1' AND (question like '% difference Apache Nginx?%' OR question like '%difference%' OR question like '%Apache%' OR question like '%Nginx?%') -- ORDER BY RAND() LIMIT 15

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() ()

SELECT * FROM seoclerks.members WHERE USERID='43' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='43' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='9399' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='9399' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='1677' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='1677' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='18151' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='18151' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM seoclerks.members WHERE USERID='17130' limit 11SELECT profilepicture FROM seoclerks.members WHERE USERID='17130' limit 1

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_member_profilepicture()

SELECT * FROM members_ledger WHERE script='/opt/clerks-staging/docroot/viewfaq.php' AND querystring LIKE '%id=10272%' AND added>=UNIX_TIMESTAMP(NOW())-1200 GROUP BY USERID 1SELECT USERID, username FROM members_ledger WHERE script='/opt/clerks-staging/docroot/viewfaq.php' AND querystring LIKE '%id=10272%' AND added>=UNIX_TIMESTAMP(NOW())-1200 GROUP BY USERID

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() ()

SELECT * FROM categories1SELECT * FROM categories

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() parseRedundantQueriesCache()

select * from categories_software order by name asc1select * from categories_software order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_GetSoftwareCategories()

select * from categories_wanttobuy order by name asc1select * from categories_wanttobuy order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_wantcategories()

select * from categories_wanttotrade order by name asc1select * from categories_wanttotrade order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_tradecategories()

SELECT * FROM seoclerks.members WHERE USERID='9.png'1SELECT profilepicture FROM seoclerks.members WHERE USERID='9.png'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

SELECT * FROM seoclerks.members WHERE USERID='4987.jpg'1SELECT profilepicture FROM seoclerks.members WHERE USERID='4987.jpg'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

SELECT * FROM seoclerks.members WHERE USERID='212316.jpg'1SELECT profilepicture FROM seoclerks.members WHERE USERID='212316.jpg'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

SELECT * FROM seoclerks.members WHERE USERID='22414.jpg'1SELECT profilepicture FROM seoclerks.members WHERE USERID='22414.jpg'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

select * from categories_faq order by name asc1select * from categories_faq order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_GetFaqCategories()

Invalid SQL

count(*)sql1error_msg

Expensive SQL

Tuning the following SQL could reduce the server load substantially
LoadCountSQLMaxMin

Suspicious SQL

The following SQL have high average execution times
Avg TimeCountSQLMaxMin
0.1066031SELECT COUNT(A.wantid) AS total FROM wanttobuy as A, categories_wanttobuy B, seoclerks.members C WHERE A.active = 1 AND A.category = B.CATID AND A.USERID = C.USERID AND (A.tags LIKE '%Companyfollowe%' OR A.skills LIKE '%Companyfollowe%')0.1066030.106603