apache 2.2 – CakePHP with nginx redirectin issue


I have a CakePHP Project which was hosted in cPanel with Apache now I am trying to host it with the Nginx server. The project loads successfully but some images are missing as I haven’t changed anything from cPanel.

Moreover, any database operations are not getting performed. Login and signup are not working which was working fine in cPanel. But the database connection is established. I am not getting what is the issue as I have just changed the server.

Here is my Nginx configuration. the PHP version is 5.6

server {

        root /var/www/html/project/app/webroot;
        index index.php index.html;

        server_name domain.com;

        client_max_body_size 200M;

        location / {
                try_files $uri $uri/ /index.php$is_args$args;   
        }

     location ~.php$ {
                client_max_body_size 200M;
                fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }

Also, there was a .htaccess file on cPanel as Nginx does not support .htaccess I have also tried to change it with Nginx but doesn’t seem to work.

Please help.