1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Turn off Apache, use only Nginx

Discussion in 'Plesk Suggestions and Feedback' started by TimReeves, Mar 31, 2016.

  1. TimReeves

    TimReeves Basic Pleskian

    13
    85%
    Joined:
    Jul 17, 2014
    Messages:
    53
    Likes Received:
    8
    Location:
    Dachau, Germany
    I have worked hard on my nginx configurations and for all the packages I (or my clients) have in use I have developed nginx configs which pass nothing through to Apache - all static requests are delivered directly, and PHP is passed by nginx directly to PHP-FPM.

    This is mean 'n lean and works real fine. But now I have the problem that on virtual servers I keep overrunning the virtualised system resources (user beancounters: tcpsndbuf, numothersock, shmpages etc.) while using only a fraction of the RAM and SDD space available.

    So: I want to minimise unneccessary use of those system resources. To that end: I would like to switch off Apache completely as I don't use it, but it uses lots of resources.

    My question is: Is there any way to tell Plesk not to use or start Apache at all? And if not, could this be put on the wish list?

    Cheers, Tim
     
  2. trialotto

    trialotto Golden Pleskian Plesk Guru

    37
     
    Joined:
    Sep 28, 2009
    Messages:
    1,443
    Likes Received:
    206
    Best Answer
    @TimReeves

    The resource (over-)usage that you describe is (primarily) related to the PHP FPM process, it is (practically) unrelated to Apache.

    Furthermore, when absolutely not passing any request to Apache, it is in fact the case that Apache should be idle (to a high degree): are you sure that Apache is not serving requests?

    Anyway, "telling Plesk not to use Apache at all" is the same as doing what you already have done (considering your statements): using Nginx as a pure and lightweight web server.

    However, there is a huge difference between theory and practice:

    - in theory, Plesk with Nginx as a pure web server can work and will work,
    - in practice, Plesk with Nginx as a pure web server will NOT work, unless one completely changes the whole default Nginx configuration template, as provided with Plesk.

    Nevertheless, theory and practice are barely relevant in the case of Plesk and Nginx combined.

    Just stop Apache and verify that all your websites are still working properly: if that is true, then you have a pure Nginx web server.

    And that is the beauty of it: your question "Is there any way to tell Plesk not to use or start Apache at all?" is already answered, if Apache can be stopped without disrupting site serving.

    In that case, Apache can be simply shutdown (forever) or even be removed.

    In short, there is no need "to tell Plesk" and/or put it on a wish list.

    Note that you should be really careful with custom Nginx configurations: any update, upgrade or micro-update can undo the customizations of Nginx conf files.

    Also note that you should be really careful with shutting down Apache: it will restart.

    Finally, note that there are no real alternatives to the "restart problem of Apache": removal is not an option and/or the update scripts for Plesk will really not change to support this.

    To be honest, if you really want a pure Nginx web server, you should not install Plesk at all: just use another stack.

    I can recommend EasyEngine and/or Webmin.

    In conclusion, it not realistic to have the desire to discard Apache from the Plesk stack.

    Hope the above provides a little bit of information.

    Regards......
     
  3. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
    I would like to notice that we are going to implement this webserver mode (no Apache, only nginx) in upcoming Plesk release.
     
    Dukemaster, Hermes6686 and Lloyd_mcse like this.
  4. trialotto

    trialotto Golden Pleskian Plesk Guru

    37
     
    Joined:
    Sep 28, 2009
    Messages:
    1,443
    Likes Received:
    206
    @IgorG,

    I suppose that "going" means "planning, not yet implemented", is that correct?

    Would be a nice addition though, having the trusted Plesk stack with an option to use Nginx as a standalone web server (really speeds up things).

    If I have time, I will PM you, in order to present some of our experiences when testing with Nginx 1.9.12 (in the Apache + Nginx and standalone Nginx setup).

    Regards......
     
    Dukemaster likes this.
  5. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
    Yes, you are correct. It will be implemented as an official feature. You will be able to switch webserver to using the only nginx engine.
     
    Dukemaster likes this.
  6. trialotto

    trialotto Golden Pleskian Plesk Guru

    37
     
    Joined:
    Sep 28, 2009
    Messages:
    1,443
    Likes Received:
    206
    @IgorG,

    Nice! And thanks for the update, I will PM you.

    Regards....
     
    Dukemaster likes this.
  7. Tommy10

    Tommy10 Basic Pleskian

    4
    70%
    Joined:
    Jan 24, 2016
    Messages:
    35
    Likes Received:
    1
    +1 - hopefully this will be added soon! :)
     
    Dukemaster likes this.
  8. 105547111

    105547111 Silver Pleskian

    32
    30%
    Joined:
    Jul 13, 2006
    Messages:
    643
    Likes Received:
    2
    Yes :)
     
    Dukemaster likes this.
  9. bambamboole

    bambamboole New Pleskian

    2
     
    Joined:
    Nov 4, 2016
    Messages:
    1
    Likes Received:
    0
    Location:
    Germany
    Are there any news about this topic @IgorG ?
     
  10. UFHH01

    UFHH01 Plesk addicted!

    44
    64%
    Joined:
    Jun 11, 2013
    Messages:
    6,762
    Likes Received:
    1,712
    Location:
    Hamburg / Germany
    Hi bambamboole,

    Pls. be informed, that you are able to use the feature "Proxy mode" ( on/off ) with the new Plesk Onyx version: => "Home > Subscriptions > YOUR-DOMAIN.COM > Apache and nginx Settings"

    Plesk-Onyx_Apache_and_nginx_Settings_PROXY_001.png

    You can find additional informations at:



     
    Dukemaster likes this.
  11. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
    Yes, you can use this new feature on Onyx, but note, that Apache will not be completely disabled, stopped, etc. Webmail will work on Apache anyway, for example.
    Unfortunately, there is still some kind of limitations which doesn't allow to disable Apache completely. But developers continue to look for options, try them and try to implement them.
     
    Dukemaster likes this.
  12. Semih

    Semih New Pleskian

    1
    70%
    Joined:
    Oct 1, 2017
    Messages:
    5
    Likes Received:
    0
    Location:
    Istanbul
    I would like to switch off Apache completely? I have Wordpress sites only and WP needs mod_rewrite Apache module in their requirements. (About » Requirements — WordPress)
    However some experts says "Forget about Apache and use nginx instead."
    Can I stop Apache? If yes, how?

    (note:I tried to disable "Proxy mode" of nginx but my WP sites became unavaible;
    [​IMG]
     
  13. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
    #11
     
Loading...