Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Help with nginx + phpfpm
  • I'm newbie to fuelphp.  I want to setup my nginx and phpfpm to host an application with fuelphp.  I've downloaded fuelphp into my project folder (proj1).  I want to access the site with http://myserver/proj1/public/index.php

    I've other apps running behind nginx so I can't change the root folder in nginx.  I've tried several alias combinations and nothing is working.

    Any help would be appreciated.
  • server {

            listen   80; ## listen for ipv4

            server_name  myserver;


            root   /var/www/myserver/;
            index index.php index.html index.htm;
            charset utf-8;

            location /proj1/public/ {
                try_files   $uri $uri/ @handler;
                expires     30d;
            }

            location @handler {
                rewrite ^ /proj1/public/index.php?/$request_uri;
            }

            location ~ \.php$ {
                    include fastcgi_params;
                    fastcgi_pass 127.0.0.1:9000;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    fastcgi_param FUEL_ENV development;
            }

    }

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

  • b0o November 2012