5

I am using Ubuntu 13.04. I've installed Nginx and configured it with ISPConfig. Then, I wanted to install the passenger module. Because Nginx doesn't allow dynamic modules, I had it compiled from source.

First, I uninstalled Nginx (with apt-get remove --purge nginx nginx-full nginx-common) and started a new Nginx installation. I then used passenger advanced mod where I added some directives to .configure option as it was installed via apt-get (/usr/share.., /etc/nginx, /var/log location etc..)

NOTE: I grabbed the compile info from nginx -V). It successfully installed and then I ran the command:

root@webserver:/# /usr/share/nginx/sbin/nginx

but it throws this error:

nginx: [emerg] mkdir() "/var/lib/nginx/body" failed (2: No such file or directory)

What's wrong?

I didn't believe the solution would be so simple because I've been playing with it all day; mkdir nginx does work.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Scott
  • 73
  • 5
    If you've solved your issue please write it up as an answer to your own question and then accept it. – slm Aug 29 '13 at 18:56

2 Answers2

6

In my case, I created new directories:

mkdir -p /var/lib/nginx
mkdir -p /var/lib/nginx/body
mkdir -p /var/lib/nginx/fastcgi

That worked for me.

sebasth
  • 14,872
0

I had to do all this:

mkdir  --parents  /var/lib/nginx/body
mkdir  --parents  /var/lib/nginx/fastcgi
mkdir  --parents  /var/lib/nginx/proxy
mkdir  --parents  /var/lib/nginx/uwsgi
mkdir  --parents  /var/lib/nginx/scgi
chown  --recursive  www-data  /var/lib/nginx