# Nginx won't start after adding scgi to config

**URL:** <https://www.ruby-forum.com/t/nginx-wont-start-after-adding-scgi-to-config/222122>\
**Category:** NGINX\
**Created:** [August 13, 2012, 4:59pm UTC](https://www.ruby-forum.com/t/nginx-wont-start-after-adding-scgi-to-config/222122 "2012-08-13T16:59:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 13, 2012, 4:59pm UTC](https://www.ruby-forum.com/t/nginx-wont-start-after-adding-scgi-to-config/222122/1 "2012-08-13T16:59:15Z")

</div>

I’m trying to set up rutorrent, and their wiki tells me to add this to  
my  
server block:

location /RPC2 {  
include scgi\_params;  
scgi\_pass unix:/tmp/rpc.sock;  
}

After I do that and restart nginx, I get 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

As far as I know the SCGI module has been built in by default since  
0.8.42.  
I’m running 1.1.19 which I’ve verified with nginx -v.

Here’s my entire server block:

> **[server { listen 80; server\_name localhost; access\_log /home/white -...](https://pastebin.com/NiaRvuVn)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Note that everything runs fine if I remove the /RPC2 location block.

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [August 13, 2012, 5:32pm UTC](https://www.ruby-forum.com/t/nginx-wont-start-after-adding-scgi-to-config/222122/2 "2012-08-13T17:32:34Z")

</div>

On 13 August 2012 15:58, Chris W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> $ 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
> 
> As far as I know the SCGI module has been built in by default since 0.8.42.  
> I’m running 1.1.19 which I’ve verified with nginx -v.

Having verified what you say about the module (whilst I don’t use it  
myself) here’s a non-nginx-config/compile-y idea:

I suggest you make /absolutely/ sure that the binary in your (root?)  
path that gets hit with “nginx -v” is the same one you end up running  
via the init script. As in, explicitly trace it through the script  
and the filesystem to ensure you’re not hitting an older binary for  
some reason.

## Jonathan

Jonathan M.  
Oxford, London, UK

> **[Jonathan Matthews :: Words Typed, Great Rates For Cash](https://www.jpluscplusm.com)**
