Focus on cloud service provider activities
Notes on website operation and maintenance

Solve the problem of restarting the VPS host LNMP one click package Nginx does not start automatically

In general, if we have installed the LNMP one click package on the VPS and server, the supporting software will start automatically whether it is restarted or not, including Nginx. But I met a friend's message, saying that after he restarted the server when installing the LNMP military brother's one click package, the website and database could not be connected. When he restarted Nginx, Lao Zuo found that the current Nginx was closed.

It seems that every time after restart, Nginx is not started after shutdown. In view of this problem, we can add the Nginx restart item to the boot file.

echo "/etc/init.d/nginx start " >>/etc/rc.local

After executing the command and adding it to the configuration file/etc/rc.local, we can restart and see that Nginx can start automatically and normally.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Solve the problem of restarting the VPS host LNMP one click package Nginx does not start automatically


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge