1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Reasons to use Apache over nginx

Discussion in 'Nginx' started by subdivisions, Oct 3, 2012.

  1. #1
    If you prefer Apache over nginx, could I ask why? I switched about a month ago and haven't looked back. Lack of mod_php isn't an issue because FPM is faster and more secure, nginx eats far less memory, it's noticeably faster, the syntax of config files is better (in my opinion), and I could really go on.
    subdivisions, Oct 3, 2012 IP
  2. ibnusaheed

    ibnusaheed Peon

    Messages:
    8
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Apache is undoubtedly the best known process-based server and Nginx is the best asynchronous server. The main advantage of the asynchronous approach is scalability. In a process-based server, each simultaneous connection requires a thread which incurs significant overhead. An asynchronous server, on the other hand, is event-driven and handles requests in a single (or at least, very few) threads.While in same condition Apache consume far too much RAM which significantly degrades performance.
    ibnusaheed, Oct 10, 2012 IP
  3. _MasterOfPuppets_

    _MasterOfPuppets_ Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Apache is STABLE
    _MasterOfPuppets_, Oct 12, 2012 IP
  4. subdivisions

    subdivisions Well-Known Member

    Messages:
    1,020
    Likes Received:
    39
    Best Answers:
    1
    Trophy Points:
    120
    #4
    So is nginx.
    subdivisions, Oct 12, 2012 IP
    bartolay13 likes this.
  5. _MasterOfPuppets_

    _MasterOfPuppets_ Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Maybe, not sure about ngnx, I tried lighthttpd and it gave me a lot of headache.
    _MasterOfPuppets_, Oct 12, 2012 IP
  6. subdivisions

    subdivisions Well-Known Member

    Messages:
    1,020
    Likes Received:
    39
    Best Answers:
    1
    Trophy Points:
    120
    #6
    Lighttpd sucks, yes.
    subdivisions, Oct 12, 2012 IP
  7. SolidShellSecurity

    SolidShellSecurity Banned

    Messages:
    264
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    45
    #7
    It's all about how you configure and setup and what support you need.
    SolidShellSecurity, Oct 12, 2012 IP
  8. RoseHosting

    RoseHosting Active Member

    Messages:
    150
    Likes Received:
    7
    Best Answers:
    6
    Trophy Points:
    88
    #8
    If you are a newbie, it's better to start with Apache because most web applications come with an Apache configuration.
    RoseHosting, Oct 12, 2012 IP
    bartolay13 likes this.
  9. wetbupa

    wetbupa Peon

    Messages:
    130
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    0
    #9
    I install Nginx on most of my servers as Nginx provides Static file serving,Reverse proxying,Load balancing, Server-side includes,FastCGI.

    Nginx is stable, secure and very easy to configure, as you will see later in the article. However, the main advantages of Nginx over Apache are performance and efficiency.

    Nginx is able to serve more requests per second with less resources because of its architecture. It consists of a master process, which delegates work to one or more worker processes. Each worker handles multiple requests in an event-driven or asynchronous manner using special functionality from the Linux kernel (epoll/select/poll).

    This allows Nginx to handle a large number of concurrent requests quickly with very little overhead. Apache can be configured to use either a process per request (pre-fork) or a thread for each request (worker). Although Apache's threaded mode performs much better than its pre-fork mode, it still uses more memory and CPU than Nginx's event-driven architecture.
    wetbupa, Oct 17, 2012 IP
    bartolay13 likes this.
  10. 123addme

    123addme Active Member

    Messages:
    168
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #10
    And what is advantage of apache ?
    123addme, Oct 24, 2012 IP
  11. wetbupa

    wetbupa Peon

    Messages:
    130
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    0
    #11
    According to Ehow, Apache has the following advantages:

    1) Apache Web Server has a large set of powerful features. These core features, combined with the extensions created by programmers around the world, help make the Apache platform competitive even against high-priced rivals. Apache has built-in support for a wide range of web programming languages, including Perl, PHP and Python. These languages are easy to learn and can be used to create powerful online applications. Apache also includes "SSL" and "TLS" support. These are protocols for sending encrypted data over the Internet, and are important in the development of safe online stores and other applications requiring privacy.


    2) Security. Since Apache was developed for a non-Microsoft operating system, and the majority of malicious programs have traditionally been written to take advantage of vulnerabilities in Windows, Apache has always enjoyed a reputation as a more secure option than Microsoft’s IIS.

    3) Apache Web Server is very portable. This means that it can be installed on a wide variety of servers and operating systems. Apache is able to run on all versions of the UNIX operating system. Linux is supported, as are the Windows NT and MacOS operating systems. In comparison, Microsoft's own Windows Server typically can be installed only on Windows operating systems.

    From a hardware standpoint, Apache can be used on any server with an Intel 80x86 series of processor when it is combined with Windows. If Apache is being used on a Unix or Linux operating system, nearly any processor type is supported. Overall, Apache is one of the most adaptable server systems currently available, and will run in a wide range of technical environments.




    wetbupa, Oct 24, 2012 IP
  12. sir_round

    sir_round Active Member

    Messages:
    205
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    58
    #12
    There is no point for comparing the two webservers since as it was already pointed out in the previous posts, they use entirely different architectures. Both applications are stable, reliable and efficient and both have their downsides as well. They are best used in different situations. Nginx is much more efficient for serving static content due to event-driven (asynchronous) operation. You may find a bunch of articles recommending nginx to be used as frontend (reverse-proxy) to apache enabling it’s caching functionality to reduce the load on the apache backend. To cope with higher loads, nginx offers load-balancing functionalities serving requests for multiple apache backend servers simultaneously. Although apache offers these features, performance on the same hardware would be immensely degraded. On the other hand, apache is much more efficient at serving dynamic websites.
    sir_round, Jun 17, 2013 IP
  13. rhewitt

    rhewitt Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #13
    Nginx is very stable -- It's used by millions of sites, including some of the largest sites on the internet (e.g. Youtube)
    rhewitt, Jul 1, 2013 IP
  14. infinitnet

    infinitnet Member

    Messages:
    51
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    35
    #14
    IMO the only reason to use Apache would be to be able to use .htaccess files and for compatibility with control panels. Other than that, there is none.
    infinitnet, Jul 4, 2013 IP
    digitalpoint likes this.
  15. kantus

    kantus Well-Known Member

    Messages:
    221
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    105
    #15
    Apache can be tuned to perform just as well as nginx or any other "high performance" web server. It really depends on what you intend on hosting.
    kantus, Sep 25, 2013 IP
  16. MyBB Hoster

    MyBB Hoster Member

    Messages:
    59
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    43
    #16
    I plan on only hosting forums what do you think a good configuration would be? I have nginx and apache running. Thanks in advanced.
    MyBB Hoster, Sep 27, 2013 IP
  17. BrickBrack

    BrickBrack Peon

    Messages:
    8
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    3
    #17
    Yeah, the damn memory fragmentation is seriously annoying to manage :mad:

    Start off with Apache, it gets the job done and is easier for beginners to configure as the internet is swimming in Apache documentation :) If you ever reach the point where Apache is struggling to cope with the traffic you can look at replacing it with Nginx or using Nginx as a caching proxy.
    BrickBrack, Oct 17, 2013 IP
  18. clark-1

    clark-1 Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #18
    You can use .htacess in nginx too
    clark-1, Nov 7, 2013 IP
  19. BrickBrack

    BrickBrack Peon

    Messages:
    8
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    3
    #19
    No you can't.
    BrickBrack, Nov 10, 2013 IP
    bartolay13 and digitalpoint like this.
  20. olddocks

    olddocks Well-Known Member

    Messages:
    3,235
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    153
    #20
    Nginx and Litespeed have little edge over apache in terms of apache. Agreed! The key to fast websites is sql. If that gets bogged, it drags and slows any http server
    olddocks, Nov 18, 2013 IP