Welcome Guest, Not a member yet? Register   Sign In
Anyone use CI with Nginx?
#10

[eluser]kylemac[/eluser]
Hey all, this may be an old post - but it comes up quite high in the google search so I thought I might mention that some of what you guys are doing can now be handled natively by nginx. Pay attention to the location block.

Code:
server {
        root /home/deploy/public_html/project/public;

        access_log /log/access.log;
        error_log /log/error.log;

        # the try_files declaration looks for the actual file, and if !exist goes to your fallback.
        location / { try_files $uri $uri/ /index.php; }


        # this is just an external file for all of your fastcgi_params;
        include php;
        
}

Here is the nginx documentation of try_files - http://wiki.nginx.org/NginxHttpCoreModule#try_files


Messages In This Thread
Anyone use CI with Nginx? - by El Forum - 09-05-2008, 06:59 PM
Anyone use CI with Nginx? - by El Forum - 09-05-2008, 08:01 PM
Anyone use CI with Nginx? - by El Forum - 09-05-2008, 08:04 PM
Anyone use CI with Nginx? - by El Forum - 09-05-2008, 08:25 PM
Anyone use CI with Nginx? - by El Forum - 09-05-2008, 10:40 PM
Anyone use CI with Nginx? - by El Forum - 10-04-2008, 10:54 PM
Anyone use CI with Nginx? - by El Forum - 04-19-2009, 07:18 PM
Anyone use CI with Nginx? - by El Forum - 07-13-2009, 01:44 PM
Anyone use CI with Nginx? - by El Forum - 08-10-2009, 03:53 PM
Anyone use CI with Nginx? - by El Forum - 05-06-2010, 12:40 PM
Anyone use CI with Nginx? - by El Forum - 05-06-2010, 05:35 PM
Anyone use CI with Nginx? - by El Forum - 05-24-2010, 10:11 PM
Anyone use CI with Nginx? - by El Forum - 11-24-2010, 04:34 PM
Anyone use CI with Nginx? - by El Forum - 02-28-2012, 08:20 PM
Anyone use CI with Nginx? - by El Forum - 02-28-2012, 10:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB