nginx multiple apps, and CodeIgniter
Luca Corti
luca at fantacast.it
Mon Jun 6 16:24:58 MSD 2011
On Sun, 2011-06-05 at 21:25 -0400, zaid tillman wrote:
> # http://www.example.net/ci/ /* Works */
> # http://www.example.net/ci/index.php /* Works */
> # http://www.example.net/ci/index.php/welcome /* Put out "No input file specified." - a 404 in access.log */
> The reason I see the problem is because I see this in the CI logs for
> *all* http requests
>
> DEBUG - 2011-06-05 19:47:23 --> No URI present. Default controller set.
> I did not want to litter my first post with code, so here is the
> pertinent info presented neatly:
I guess you have to set PATH_INFO.
>
> location ~ \.php$ {
> include /etc/nginx/fastcgi_params;
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
> fastcgi_param SCRIPT_FILENAME /srv/www/www.example.net/public_html$fastcgi_script_name;
> }
Try this:
location ~ \.php {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
}
ciao
Luca
More information about the nginx
mailing list