Nginx configuration for SemanticScuttle?

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/index/?page=N (N=2, 3, etc)

http://bookmarks.example.com:81/populartags

but all the others, don’t, meaning that e.g.
http://bookmarks.example.com:81/tags.php/linux redirect to
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;
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;
}
}

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 )

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
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: