Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
find /etc/nginx/ -name scgi_params? –  quanta Aug 13 '12 at 15:07
    
gives me /etc/nginx/scgi_params –  James Linton Aug 13 '12 at 15:50
    
Which distro are you running? How did you install Nginx? –  quanta Aug 13 '12 at 16:51

2 Answers 2

up vote 0 down vote accepted

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;
}
share|improve this answer
    
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 –  James Linton Aug 13 '12 at 16:32
    
How did you solve this? –  quanta Aug 14 '12 at 2:30

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/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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