1

I'm trying to install libtorrent, rtorrent and rutorrent. I'm at the stage of installing rutorrent, and their wiki says I have to put this location block in my config file:

location /RPC2 {
    include scgi_params;
    scgi_pass unix:/tmp/rpc.sock;
}

This is my entire config block for this server:

server {
    listen 80;
    server_name localhost;
    access_log /home/whitey/sites/localhost/logs/access.log;
    error_log /home/whitey/sites/localhost/logs/error.log;
    root /home/whitey/sites/localhost/htdocs;
    index index.html index.php /index.php;

    location / { 

    }

    location ~ \.php$ {
        fastcgi_pass unix:/tmp/phpfpm.sock;
        fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
        expires max;
    }

    location /RPC2 {
        include scgi_params;
        scgi_pass unix:/tmp/rpc.sock;
    }
}

When I rebooted nginx for the new config to take effect, I got this error:

$ sudo /etc/init.d/nginx start
Starting nginx: nginx: [emerg] unknown directive "scgi_pass" in /etc/nginx/conf.d/localhost.conf:24
nginx: configuration file /etc/nginx/nginx.conf test failed

Now, the SCGI module for nginx has been built by default since version 0.8.42, this is the output from nginx -v: nginx version: nginx/1.1.19

Any help is appreciated, thanks.

3
  • find /etc/nginx/ -name scgi_params?
    – quanta
    Aug 13, 2012 at 15:07
  • gives me /etc/nginx/scgi_params Aug 13, 2012 at 15:50
  • Which distro are you running? How did you install Nginx?
    – quanta
    Aug 13, 2012 at 16:51

2 Answers 2

0

Since your above config is put into /etc/nginx/conf.d/localhost.conf and scgi_params located at /etc/nginx, therefore Nginx cannot find out the included file.

Using absolute path instead:

location /RPC2 {
    include /etc/nginx/scgi_params;
    scgi_pass unix:/tmp/rpc.sock;
}
2
  • Getting there, but now I get a new error: unknown directive "scgi_param" in /etc/nginx/scgi_params:1 Here's the entire scgi_params file: pastebin.com/ExD1fH3e Aug 13, 2012 at 16:32
  • How did you solve this?
    – quanta
    Aug 14, 2012 at 2:30
0

for me it was that my nginx (~0.7 in squeeze) doesnt come with SCGI module

but there is a nginx-full package in backports that does !

i installed it, and now it starts up fine

http://wiki.debian.org/Nginx

http://backports-master.debian.org/Instructions/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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