/setup returns 404 using nginx

hi, i’ve just unzipped all files in a folder but when i go /setup i get 404.
here’s my nginx conf

server {
listen x.x.x.x:80;
server_name subdomain.domain.com;
root /home/www/folder_name;

location / {
    index index.php index.html index.htm;
}

location ~*  \.(jpg|jpeg|png|gif|ico|bmp|css|js)$ {
    expires 365d;
    log_not_found off;
    access_log off;
    error_log off;
}

 location ~ \.php$ {
   try_files $uri $uri/ $uri.php;
   fastcgi_pass unix:/var/run/php5-fpm/domain.com.socket;
   fastcgi_split_path_info ^(.+\.php)(/.+)$;
   fastcgi_index index.php;
   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   include fastcgi_params;
}

}

any idea?
thanks in advance :wink:

i’ve sorted it out.
correct nginx config should be as below

location / {
        try_files $uri $uri/ /index.php;
    }
 location ~ .php$ {
       try_files $uri =404;
       fastcgi_pass unix:/var/run/php5-fpm/socket_name.socket;
       fastcgi_split_path_info ^(.+\.php)(/.+)$;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       include fastcgi_params;
}

hope this will help someone :wink:

however, it keeps throwing this warning:

A PHP Error was encountered
Severity: Warning

Message: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

Filename: libraries/Log.php

Line Number: 87

Thanks for the nginx config!

The error is thrown because your webserver does not have a timezone set but there should be one set. You can ignore this “error” as it’s just a warning.

Yes i know. I’ve added the below as the first line in /index.php

if( ! ini_get(‘date.timezone’) )
{
date_default_timezone_set(‘GMT’);
}

Cheers!