{"id":361,"date":"2010-10-16T11:32:22","date_gmt":"2010-10-16T19:32:22","guid":{"rendered":"http:\/\/blog.portnumber53.com\/?p=361"},"modified":"2010-10-16T11:32:22","modified_gmt":"2010-10-16T19:32:22","slug":"nginx-with-kohana-3-x-friendly-urls","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2010\/10\/16\/nginx-with-kohana-3-x-friendly-urls\/","title":{"rendered":"NGINX with Kohana 3.x friendly URLs"},"content":{"rendered":"<p>I really enjoy working with <a title=\"opens Kohana website in a new window\" href=\"http:\/\/kohanaframework.org\/\" target=\"_blank\" rel=\"noopener\">Kohana <\/a>and since I got a server from one of the hosting companies listed at <a title=\"opens LowEndBox.com in another window\" href=\"http:\/\/www.lowendbox.com\/\" target=\"_blank\" rel=\"noopener\">LowEndBox<\/a>, I decided to ditch <a title=\"opens Apache website in a new window\" href=\"http:\/\/httpd.apache.org\/\" target=\"_blank\" rel=\"noopener\">Apache <\/a>and go with <a title=\"open Nginx website in a new window\" href=\"http:\/\/wiki.nginx.org\" target=\"_blank\" rel=\"noopener\">Nginx<\/a>, thing is&#8230; I also like pretty URLs \ud83d\ude42<\/p>\n<p>As a backup from the comment located here: <a title=\"open original post website\" href=\"http:\/\/forum.kohanaframework.org\/discussion\/comment\/11553\/#Comment_11553\" target=\"_blank\" rel=\"noopener\">http:\/\/forum.kohanaframework.org\/discussion\/comment\/11553\/#Comment_11553<\/a><\/p>\n<p>I&#8217;m copying and pasting it in my blog for easier reference, plus it&#8217;s modified to fit my servers configuration:<\/p>\n<pre class=\"brush:bash\">location \/ {\n    index    index.php index.html;\n\n    if (!-e $request_filename) {\n        rewrite ^\/(.*)$ \/index.php\/$1 last;\n    }\n\n    include  \/home\/httpd\/domains\/example.com\/htaccess;\n}\n\nlocation ~ .php$ {\n    fastcgi_pass   127.0.0.1:9000;\n    fastcgi_index  index.php;\n    fastcgi_param  SCRIPT_FILENAME  \/home\/httpd\/domains\/example.com\/html$fastcgi_script_name;\n\n    include \/etc\/nginx\/fastcgi_params;\n}\n\n# kohana\nset  $path_info \"\";\nlocation \/index.php {\n    if ($uri ~ \"^\/index.php(\/.+)$\") {\n        set  $path_info  $1;\n    }\n    fastcgi_pass   127.0.0.1:9000;\n    fastcgi_index  index.php;\n    fastcgi_param  SCRIPT_FILENAME  \/home\/httpd\/domains\/example.com\/html\/index.php;\n\n    fastcgi_param  PATH_INFO $path_info;\n    include \/etc\/nginx\/fastcgi_params;\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I really enjoy working with Kohana and since I got a server from one of the hosting companies listed at LowEndBox, I decided to ditch Apache and go with Nginx, thing is&#8230; I also like pretty URLs \ud83d\ude42 As a backup from the comment located here: http:\/\/forum.kohanaframework.org\/discussion\/comment\/11553\/#Comment_11553 I&#8217;m copying and&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/blog.portnumber53.com\/index.php\/2010\/10\/16\/nginx-with-kohana-3-x-friendly-urls\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[208,258,303],"class_list":["post-361","post","type-post","status-publish","format-standard","hentry","category-kohana","tag-kohana-3","tag-nginx","tag-seo"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":0,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/361\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}