The environment under my commonly used Linux system is basically Junge's lnmp one-click package, and problems rarely occur. However, today I encountered a case where lnmp was installed without any problems, but after restarting the system, the IP default page and probe could not be accessed. , logged in to the system and found that nginx did not run automatically. The operating system and kernel are as follows:
1
I checked with chkconfig --list and found that nginx levels 2, 3, 4 and 5 are all on. I tried to start nginx manually but no error was reported, and Normal operation means that it cannot run automatically after restarting the operating system. Although this problem has little impact during use, it does affect my mood.
I searched online and found the same command: echo "/etc/init.d/nginx start " >>/etc/rc.local. Add the nginx startup item to the boot file. Tried but no solution. The problem should be related to the kernel of the operating system I am using. Finally, I executed:
echo "/usr/local/nginx/sbin/nginx">>/etc/rc.local
2
I also set a startup for nginx, and it was OK. After restarting the server, nginx finally started automatically.

postid
8884

Leave a Reply