After change apache2 to nginx

Discussion in 'Installation/Configuration' started by tou_di, Sep 15, 2022.

  1. tou_di

    tou_di New Member

  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Basically, ISPConfig supports only either nginx or apache2 web server, not both, on one same server as it is concluded to be more efficient that way.

    Therefore when ISPConfig detected apache2, it will use it as its default web server and will ignore nginx, even if it was installed, thus will only create an apache2 config vhost each time you add a new website.
     
  3. tou_di

    tou_di New Member

    Thanks for the answer - I turned off the web server and will do manual entries. I tried to switch the web directories to the user www-data from nginx.
    Thank you and best regards.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I think the instructions you used are incomplete, at least I don't see that he has changed from apache to nginx plugin in ISPConfig server (plugins-enabled) directory.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Really bad idea as that's quite insecure and ISPConfig must fail after that change.
     
  6. tou_di

    tou_di New Member

    You have a complete manual. I will be grateful.
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I used that manual to turn my web server from apache2 to nginx around six years ago and it works just fine.

    Your problem, as I understood, is having both in one server and this as I explained above will not work.

    You must ensure that there is no trace of apache2 if you intend this to be a pure ISPConfig nginx web server.

    If you intend to build a proxy server, that is another issue, and a customized plugin is one way to go about it, but we do not encourage this setup.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    See comments under that guide, there you can find instructions for the missing part.

    It can not have worked, at least not the version that is shown there online at the moment. You either switched the plugin manually or you ran an ispconfig update afterwards to fix your install.
     
  9. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Yes, I did mine about 6 years ago and it works and is still working, even after various upgrades and updates, however, I do remember running ISPConfig update thereafter because it was logical, though the manual does not say so. But I do not remember the comment about the plugin already existed when I was doing that, because I did not do so.
     
    till likes this.
  10. TonyG

    TonyG Active Member

    Trying to keep up with info here... From what I'm understanding in this thread, is the best practice simply to configure some slave systems with nginx and some with apache, and then install to specific servers based on requirements/preferences? I trust a master server won't have any issues with slaves running the different packages?

    Personally I prefer Apache, and only support that for now. But I've had a number of comments about Nginx being better/preferred and it seems reasonable to support both as time and expertise allow.

    TY
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, if you want to have different web servers, you need separate systems. This thread here is about a different topic though, it is about exchanging the httpd server on a system, which can cause quite a lot of issues as apache can't read the config or nginx and vice versa, plus custom directives configs won't work as well and need to be rewritten.

    Correct.
     
    TonyG likes this.

Share This Page