kenjis / codeigniter-composer-installer

Installs the offical CodeIgniter 3 with secure folder structure via Composer
MIT License
377 stars 118 forks source link

Nginx in subfolder #19

Open zadro opened 7 years ago

zadro commented 7 years ago

Racking my brain on getting this to work. I have have a WP install and other things in /home/site/www and trying to install CI in /home/site/www/api

Keep getting 404 errors. Thoughts?

nginx conf below. Thanks!

        location /api {
                root /home/site/www/api/public;
                index index.php;
                try_files $uri $uri/ /index.php?$args;

                location ~ \.php$ {
                        try_files $uri =404;
                        include fastcgi_params;
                        fastcgi_param SCRIPT_FILENAME $request_filename;
                        fastcgi_split_path_info ^(.+\.php)(/.+)$;
                        fastcgi_pass unix:/var/run/php_fpm.sock;
                }
        }