Question

We are running into the following error when we try to start Nginx (on Ubuntu) "" Starting nginx "/usr/local/nginx/on" "No such file or directory" ""

It started showing up all of a sudden.

Did anyone run into this scenario? Any pointers?

Thanks in advance

Was it helpful?

Solution

The problem here is probably that you a something like access_log on; in one of your config-files. Just change on to the path/to/your/logfile :)

OTHER TIPS

It doesn't seem you are running the Nginx provided by apt-get because that one would be started with "sudo /usr/sbin/nginx". Is you nginx binary really placed in "/usr/local/nginx/on"? Where did you get it from in this form?

My ubuntu install uses service to start nginx:

sudo service nginx start

If the error message appears in the log file and not the shell, then I think the missing file might be something included by nginx.conf or by another conf file. Did you add any configuration or remove any configuration recently?

If it appears in the shell, then chances are something is broken in your nginx install.

I've got nginx installed on my Ubuntu server, and there's no /usr/local/nginx/on.

I start it with /etc/init.d/nginx on.

you just need co create directory /usr/local/nginx writable to nginx process

I had exactly same problem ("No such file or directory" mgs), and the reason is following - the file has wrong carriage return symbols. As simple as that! I'm on Windows, my text editor inserted CR+LF for carriage return, while Unix accepts only LF, otherwise it cannot parse the file.

You can read more details how to convert your bash script from Windows to Unix here - http://kb.iu.edu/data/acux.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top