I have repeatedly heard about web server configurations when apache is not used at all and only use nginx as a web server. Questions that arise in connection with this:

1) The reasons for this decision?

2) Benefits?

3) What are the pitfalls of such a solution? For example, many control panels with an Apache seem to work, and VestaCP, when installed, is generally installed along with an Apache and a mysql server. It turns out that such panels can no longer be used, or is there no need for them in this case?

    3 answers 3

    There are such configurations.

    1. There is no need to configure Apache
    2. Fewer entities that need to be dealt with on the server (see clause 1). Due to the lack of additional laying in the form of Apache, a slight decrease in the response time of the query results to the client
    3. I see no need for a panel on the server at all, since any panel is a potential security hole and some additional consumption of server resources. Configs of what can be installed and configured through the panel are not so complicated that they do not learn to write themselves. (There are enough examples of such configs on the network, and MySQL is set up elementary.) Although, I agree, the panel can simplify work with the server.

    All of the above is purely my opinion. I do not pretend to be the ultimate truth. (The question of the use / non-use of Apache or Nginx is fraught with serious holivars, in which everyone stays with his own).

    • Thank. Very clear answer. At least he pushed me to thinking and allowed me to draw some conclusions. - RoboNoob

    In fact, you should be wondering - why do you need Apache on the server at all? nginx often has to do everything the same.

    Admin panels are not at all reefs. You just have to choose and install the one that nginx supports. In addition, you need to understand: the admin panel is actually an optional thing, if you were able to install and configure nginx, you can also raise the site on it.

    Indeed, there is only one pitfall. Many CMS or frameworks contain an "out of the box" .htaccess file, which is part of the Apache configuration system. If you will raise such a product to nginx, you will most likely need to rewrite all the settings from this file into the nginx config. To do it right is that task, therefore Apache is put.

      "The taste and color of all the markers are different." My favorite "markers": debian, centos, nginx, postgresql. From personal experience:

      1. Install and configure zabbix 3.2.1 on multiple servers. Used: nginx, php (5) -fpm, postgresql; NOT used: apache, mysql. I do not observe problems.
      2. Install and configure your owncloud 9 on a couple of servers, also - only nginx, php (5) -fpm, postgresql. A few months ago I began to "crawl" on the nextcloud 10. At nextcloud 10 I couldn’t configure Collabora Online to nginx. The reason is that nginx was unable to proxy web socket requests, at least as standard. There was no time to "finish" nginx. Installed for this apache, only for Collabora Online. The main frontend is nginx.