Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get Zurmo CRM running on my Debian Jessie system on localhost. I couldn't find an example nginx config and the application needs to rewrite URLS, which I have done wrong.

I also use rewrite on drupal, and I thought it's nginx configuration would work, but no luck.

server {
    server_name zurmo;
    listen 80;
    root /var/www/sites/zurmo;
    index index.php;
    location = / {
            root /var/www/sites/zurmo;
            index index.php;

    location / {
            root /var/www/sites/zurmo;
            index index.php;

            if (!-f $request_filename) {
                    rewrite ^(.*)$ /index.php/$1 last;

            if (!-d $request_filename) {
                    rewrite ^(.*)$ /index.php/$1 last;

    location ~ ^/(protected|framework|themes/\w+/views) {
            deny  all;

    error_page 404 /index.php;

    location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
            root /var/www/sites/cyruserv;
            access_log off;
            expires 30d;

    location ~ \.php$ {
            fastcgi_split_path_info ^(.|\.php)(/.+)$;

            set $fsn /index.php;

            fastcgi_param SCRIPT_FILENAME $document_root$fsn;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_param PATH_TRANSLATED $document_root$fsn;

            include fastcgi_params;


I did change it a little bit for what I use for drupal.

rewrite ^(.*)$ /index.php/$1 last;


rewrite ^(.*)$ /index.php?q=$1 last;

I'm not sure what rewrite rule to use, I could not find anything in the Zurmo documentation. If someone could fix this config for me that would be great

Zurmo redirects URLs to index.php/[request_url] I need to rewrite them for it.

For instance:


Redirects to:


This is the error I get:

2013/08/07 20:51:58 [error] 16576#0: *115 rewrite or internal redirection cycle while processing "/index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//app/index.php/install/default", client:, server: zurmo, request: "GET /app/index.php/install/default HTTP/1.1", host: "zurmo"
share|improve this question
Did you ever figure this out? I tried to use the yii rewrite rules since it was writtenin Yii – Devin Dixon Jan 27 '14 at 0:48

Your Answer


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

Browse other questions tagged or ask your own question.