Kalkun and Nginx, config that actually works

Hello.
First of all you should have PHP and Nginx up and running.

After many tests this Nginx config works fine with Kalkun 0.7.1:

server {
        listen 80;
        server_name kalkun.domain.com;

	access_log /var/log/nginx/kalkun.access.log;
	error_log /var/log/nginx/kalkun.error.log;
		
	root /var/www/localhost/htdocs/kalkun;

        client_max_body_size 10G;
        fastcgi_buffers 8 16K;
	fastcgi_buffer_size 53k;

	location / {
		index  index.php;
	}

	location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
		access_log        off;
		expires           360d;
	}

	location ~ /\.ht {
		deny  all;
	}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ ^(.+?\.php)(/.*)?$ {
                try_files $1 = 404;

                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$1;
                fastcgi_param PATH_INFO $2;
                fastcgi_param HTTPS on;
                fastcgi_pass 127.0.0.1:9000;
        }
}

Edit Kalkun’s file “application/config/config.php”:

$config['uri_protocol']	= "PATH_INFO";

Done!

Leave a Reply