# Nginx configuration for SemanticScuttle?

**URL:** <https://www.ruby-forum.com/t/nginx-configuration-for-semanticscuttle/242918>\
**Category:** NGINX\
**Created:** [August 7, 2015, 11:50am UTC](https://www.ruby-forum.com/t/nginx-configuration-for-semanticscuttle/242918 "2015-08-07T11:50:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [August 7, 2015, 11:50am UTC](https://www.ruby-forum.com/t/nginx-configuration-for-semanticscuttle/242918/1 "2015-08-07T11:50:09Z")

</div>

Greetings,

I have several Web applications running on a Centos 6.6 server.  
I am migrating them from Apache to Nginx. Apache is still  
running, so I’m running nginx on port 81 for now.

The general setup is OK. I ALREAADY have Drupal 7 and Wordpress  
sites served this way. The ONLY application that does not work  
is SemanticScuttle (SC).

The closest I’ve got to make it “run” is with the configuration  
below, turning clean urls off in the SC config file, and using  
a rewrite rule created by winginx, when you give it the  
.htaccess distributed with SC.

with that configuration, all these URLS work:

[http://bookmarks.example.com:81/](http://bookmarks.example.com:81/)  
[http://bookmarks.example.com:81/](http://bookmarks.example.com:81/)  
[http://bookmarks.example.com:81/index/?page=N](http://bookmarks.example.com:81/index/?page=N) (N=2, 3, etc)

[http://bookmarks.example.com:81/populartags](http://bookmarks.example.com:81/populartags)

but all the others, don’t, meaning that e.g.  
[http://bookmarks.example.com:81/tags.php/linux](http://bookmarks.example.com:81/tags.php/linux) redirect to  
[http://bookmarks.example.com:81/populartags](http://bookmarks.example.com:81/populartags) (which must be  
some SC fallback URL, I guess…)

What next? What is happening? I know it’s something stupid,  
but right now I could really use some kind pointer to whatever  
it is that I am missing, or on how to debug more effectively.

TIA,  
Marco  
here is the configuration of nginx for this virtual host:

server {  
server\_name [bookmarks.example.com](http://bookmarks.example.com);  
listen 81;  
root /var/www/ntml/scuttle/www/;  
index index.php;

```
    location / {
    rewrite ^/([^/.]+)/?(.*)$ /$1.php?$2 break;
    include fastcgi_params;
    fastcgi_pass unix:/tmp/phpfpm.sock;
    fastcgi_param SCRIPT_FILENAME

```

$document\_root$fastcgi\_script\_name;  
fastcgi\_intercept\_errors on;  
fastcgi\_split\_path\_info ^(.+.php)(.\*)$;  
fastcgi\_hide\_header X-Powered-By;  
fastcgi\_index index.php;  
}  
}

---

<div class="post-metadata">

**Author:** ![MSFioretti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f14d63/32.png) [@MSFioretti](https://www.ruby-forum.com/u/MSFioretti)\
**Post date:** [August 8, 2015, 3:17pm UTC](https://www.ruby-forum.com/t/nginx-configuration-for-semanticscuttle/242918/2 "2015-08-08T15:17:32Z")

</div>

After an IRC session in which I assisted Semantic Scuttle developer  
Christian Weiske to investigate this issue, he provided the following  
nginx  
configuration. Christian says it works on debian 8, nginx 1.6.2. I can  
confirm that also works on Centos 6.6, nginx 1.0.15, the only thing I  
had to  
change was the path to the unix socket. Many thanks to Christian for his  
patience, and for SC in general of course!

Bye,  
Marco

(from [nginx configuration for semanticscuttle - p.cweiske.de](http://p.cweiske.de/216) )

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26

server {  
listen 80 default\_server;  
root /var/www/sc/www;  
index index.php;  
server\_name \_;

```
    location ~ \.php(/.*)?$ {
            # regex to split $uri to $fastcgi_script_name and

```

$fastcgi\_path  
fastcgi\_split\_path\_info ^(.+.php)(/.+)$;

```
            # Check that the PHP script exists before passing it
            try_files $fastcgi_script_name =404;

            # Bypass the fact that try_files resets 

```

$fastcgi\_path\_info  
# see: [#321 (try\_files & $fastcgi\_path\_info) – nginx](http://trac.nginx.org/nginx/ticket/321)  
set $path\_info $fastcgi\_path\_info;  
fastcgi\_param PATH\_INFO $path\_info;

```
            fastcgi_index index.php;
            include fastcgi.conf;
            #include snippets/fastcgi-php.conf;
            # With php5-fpm:
            fastcgi_pass unix:/var/run/php5-fpm.sock;
    }

```

}

Posted at Nginx Forum:

> **[SOLVED: nginx configuration for SemanticScuttle???](https://forum.nginx.org/read.php?2,260845,260882#msg-260882)**
>
> Greetings, I have several Web applications running on a Centos 6.6 server. I am migrating them from Apache to Nginx. Apache is still running, so I'm running nginx on port 81 for now. The general setup is OK. I ALREAADY have Drupal 7 and Wordpress...
