0

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?

quanta
  • 51,413
  • 19
  • 159
  • 217
Noah Clark
  • 547
  • 4
  • 10
  • 20

1 Answers1

2
/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.

quanta
  • 51,413
  • 19
  • 159
  • 217
  • 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. http://www.sk3tchy.com/archlinux-passenger-install-nginx-module-rc-d-dameon/ – Noah Clark Dec 07 '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 07 '11 at 16:00