Install Code Igniter On NginX

Open the Nginx Configuration:
# vim /usr/local/nginx/conf/nginx.conf
add this line:
server {
listen       80;
        server_name  proxy.balancer.pnj;
        index index.php index.html index.htm;
        root html;

        error_page   500 502 503 504  /50x.html;

        location / {
               if (-f $request_filename) {
                       expires max;
                       break;
               }
               if (!-e $request_filename) {
               rewrite ^/(.*)$ /index.php/$1 last;
               }
       }

        location = /50x.html {
            root   html;
            }
        location /index.php {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/index.php;
            include /usr/local/nginx/conf/fastcgi_params;
        }

}
the last change:
/system/aplication/config/config.php
$config['uri_protocol']    = "REQUEST_URI";
It Simple –NCA ^_^

Ref:
http://codeigniter.com/forums/viewthread/99180/
http://www.farinspace.com/codeigniter-nginx-rewrite-rules/

Install Server Networking Programming

Support you how to install server, networking and Programming Easy

0 comments:

You can post comment with english language or indonesia language.
Anda bisa memberikan komentar dalam bahasa inggris atau bahasa indonesia.