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 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;
                    break;
            }

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

    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_pass 127.0.0.1:9000;
            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;

was

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:

http://zurmo/

Redirects to:

http://zurmo/app/index.php/install/default

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: 127.0.0.1, server: zurmo, request: "GET /app/index.php/install/default HTTP/1.1", host: "zurmo"
share|improve this question
1  
Did you ever figure this out? I tried to use the yii rewrite rules since it was writtenin Yii –  Devin Dixon Jan 27 at 0:48

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.