Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem that the Plesk panel Nginx can not be started automatically

Shulou Source: shulou.com Published: 2022-05-31 21:56:47 09月22日 Update

This article shows you how to solve the problem that the Plesk panel Nginx can not be started automatically, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Problem description:

The Nginx proxy for Plesk is disabled and Apache is used separately, because the bandwidth and number of connections can be set for each site when using Apache alone. After re-enabling the Nginx agent, it is found that Nginx does not boot automatically after restarting the server. The following error occurs when running systemctl status nginx.service, but it can be started manually through systemctl start nginx.servie.

[root@www] # systemctl status nginx.service ● nginx.service-Startup script for nginx service Loaded: loaded (/ usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since five 2018-01-12 21:19:58 CST; 25s ago January 12 21:19:57 www.ezloo.com systemd [1]: Starting Startup script for nginx service... January 12 21:19:58 www.ezloo.com nginx [844]: nginx: the configuration file / etc/nginx/nginx.conf syntax is ok January 12 21:19:58 www.ezloo.com nginx: nginx: [emerg] bind () to 172.31.191.115 15 www.ezloo.com nginx (99: Cannot assign requested address) January 12 21:19:58 www.ezloo.com nginx: nginx: configuration file / etc/nginx/nginx.conf test failed January 12 21:19:58 Www.ezloo.com systemd [1]: nginx.service: control process exited Code=exited status=1 12 21:19:58 www.ezloo.com systemd [1]: Failed to start Startup script for nginx service. 21:19:58 www.ezloo.com systemd [1]: Unit nginx.service entered failed state. 21:19:58 www.ezloo.com systemd [1]: nginx.service failed.

Solution:

Edit / etc/sysctl.conf and add the following line of code:

# allow processes to bind to the non-local address net.ipv4.ip_nonlocal_bind = 1

Run it again:

Sysctl-p / etc/sysctl.conf

When you restart the server, you find that Nginx can start normally.

Solve the problem that the Plesk panel Nginx cannot be started automatically

According to reason, on a server, simply using Apache uses less memory and CPU than using Nginx agents. After all, Nginx still takes up resources. I don't know why Plesk uses Nginx as a front-end agent. In addition, since we use Nginx as a proxy, we should be allowed to separate the front and back end, that is, the back-end server is on another server.

The above content is how to solve the problem that the Plesk panel Nginx can not be started automatically. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Server agent service problem panel time content that is skills knowledge running concise to the point one line code memory front end method can pass bandwidth Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei OPPO Reno MySQL Docker MariaDB