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.

1
  • 5
    If you've solved your issue please write it up as an answer to your own question and then accept it. Commented Aug 29, 2013 at 18:56

2 Answers 2

7

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.

1
  • 2
    bash oneliner: mkdir -p /var/lib/nginx/{body,fastcgi} Commented Sep 21, 2018 at 8:52
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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.