Nginx self-starting file running error

  
 

Compile and install Nginx, use service nginx status to check the status, always appears: env: /etc/init.d/nginx: No such file or directory

The reason for this error is because of Linux It is different from the line end flag of the Windows
text file. In Linux, text files use "\ " to mean carriage return, while Windows uses "\ \ " to mean carriage return. So using Windows text files in Linux often leads to errors. To avoid this error, Linux provides two commands for converting text formats: dos2unix and unix2dos, dos2unix converts "\ \ " into "\ ", unixtodos converts "\ " into " \ \ ". The use of the commands dos2unix and unix2dos is very simple, the format is: dos2unix filename

Copyright © Windows knowledge All Rights Reserved