Kohana

Kohana Framework
Kohana is famous PHP framework, based on Hierarchical MVC pattern. The latest version of Kohana can be downloaded from http://kohanaframework.org/download This setup will be based on Kohana-3.3.1, Nginx-1.5.9, PHP-FPM-5.3.10-1ubuntu3.9, Ubuntu 12.04.1 LTS

Nginx Configuration
The minimum Nginx configuration for Kohana user             www-data; worker_processes 2;

events { worker_connections 1024; }

http { include           mime.types; default_type      application/octet-stream;

sendfile          on; tcp_nopush        on;

keepalive_timeout 65 65;

gzip              on;

server { listen        80; server_name   your.domain.name; root          /your/www-data/directory; index         index.html index.htm index.php;

# The $uri/ is necessary. If user tries: # http://domain/kohana => http://domain/kohana/ => http://domain/kohana/index.php location / { try_files $uri $uri/ =404; }

# Deny access to files starting with dot (.htaccess, .svn, etc) location ~ /\. {            deny all; }

# Set the cache for static contents location ~* \.(gif|jpg|png|svg|tiff|pdf|ico)$ { expires   30d; }

# Handle the PHP through FastCGI location ~* \.php$ { try_files    $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; include      fastcgi.conf; }

# Kohana rewrite. This is assuming that you upload the Kohana at         # /var/www-data/your_domain_name/kohana location /kohana/ { fastcgi_index index.php; fastcgi_pass unix:/var/run/php5-fpm.sock; include      fastcgi.conf; }    }

# Refuse connection without "Host:" request server { listen        80 default_server; return        444; } }

Testing Kohana
Use your browser to fetch: http://yourdomain.name/kohana http://yourdomain.name/kohana/welcome

This should display the Kohana "Hello world" message.