CentOS 7 Nginx Error Collection

Source: Internet
Author: User

"personal records, there must be a misunderstanding and understanding of the place, small white always has a growing process, I hope you have a lot of advice." "

Nginx Error Collection


1. Env:/etc/init.d/nginx: No file or directory


This problem is beginning to confuse me for a long time, obviously the file is there, ah, the script is nothing wrong ah, how to say that the file can not be found, behind the net to see that the file format for Doc,linux is not recognized, so, my approach is : Copy the contents of the file, and then delete the previous/etc/init.d/nginx, use the Vi/etc/init.d/nginx to build one, and then copy the contents , I was so solved. On the Internet to see a simple method: You can open the file through VIM, if you can see the ^m characters, you can determine the DOS format. Then you can execute the command in vim:%s/\r\+$//e, convert it to UNIX format. the second method has not tried, I do not know whether can be done, I believe it should be possible.


2. Starting Nginx (via Systemctl): Warning:unit file of Nginx.service changed on disk, ' Systemctl daemon-reload ' re Commended
This is a warning, this is after I modified the/etc/init.d/nginx file appears, this problem, directly according to its prompt operation: $ systemctl daemon-reload can be.



3, starting Nginx (via Systemctl): Job for Nginx.service failed. See ' systemctl status Nginx.service ' and ' journalctl-xn ' for details.

When such a hint appears, the general first executes the $ systemctl status Nginx.service to see the specific situation below.

For example:

[Email protected] init.d]# systemctl status Nginx.servicenginx.service-lsb:start and stop Nginx   loaded:loaded (/E  Tc/rc.d/init.d/nginx)   active:failed (result:resources) since three 2015-06-24 20:21:31 CST; 5min ago  process:18620 Execstart=/etc/rc.d/init.d/nginx Start (code=exited, status=0/success) June 20:21:31 Leco.lan systemd[1]: Starting LSB: Start and stop Nginx ... June 20:21:31 Leco.lan nginx[18620]: Starting Nginx:nginx: [Emerg] Open () "/var/run/nginx/nginx.pid" failed (2:no such File or directory) June 20:21:31 Leco.lan nginx[18620]: [  OK  ]6 month 20:21:31 Leco.lan systemd[1]: PID file/var/ru N/nginx/nginx.pid not readable (yet.) after start.6 month 20:21:31 Leco.lan systemd[1]: Failed to start Lsb:start and stop Nginx.6 month 20:21:31 Leco.lan systemd[1]: Unit Nginx.service entered failed state.





To be continued .....



















CentOS 7 Nginx Error Collection

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.