I'm trying to setup passenger and nginx on Arch, but I can't seem to get the nginx server to even start.

I've followed the guide found here: https://wiki.archlinux.org/index.php/Nginx#Ruby_Integration_.28Ruby_on_Rails_and_Rack-based.29 under option A using the ruby gems to do the installation. I have nginx installed in the /opt/nginx/ directory.

I've symbolically linked /opt/nginx/sbin/nginx to /usr/bin/nginx and added the init script found at https://wiki.archlinux.org/index.php/Nginx/Init_script. I've also changed the permissions to 755 and it is owned by root as suggested.

I get the following error though when I run sudo /etc/rc.d/nginx start

/etc/rc.d/nginx: line 5: /etc/conf.d/nginx: No such file or directory
:: Checking configuration
[BUSY] nginx: [crit] pread() "/opt/nginx/" failed (21: Is a directory)
nginx: configuration file /opt/nginx/ test failed

What does this mean?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted
/etc/rc.d/nginx: line 5: /etc/conf.d/nginx: No such file or directory
:: Checking Configuration
[BUSY] nginx: [crit] pread() "/opt/nginx/" failed (21: Is a directory)
nginx: configuration file /opt/nginx/ test failed

It means that:

  • the /etc/conf.d/nginx file doesn't exist. Just create it or comment out the below line in init script:

    . /etc/conf.d/nginx

  • you set the wrong configuration file: /opt/nginx/ is a directory which you specify for --prefix when compiling. Maybe /opt/nginx/etc/nginx.conf.

link|improve this answer
What does /etc/conf.d/nginx do or rather should do? I ended up getting it working using what you told me and copying this in and making minor changes to it. sk3tchy.com/… – Noah Clark Dec 7 '11 at 14:54
It is the config file to define NGINX_CONFIG, NGINX_PID, ... (same with /etc/sysconfig/... in the Red Hat based) – quanta Dec 7 '11 at 16:00
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.