server

    {

        listen 8000;

        server_name svsapi.svsmarkets.com;

 #root   /var/www/SFWEBSITE/API/public;       

 index index.php index.htm index.html;

    location ~ \.php$ {

        add_header Access-Control-Allow-Origin *;

add_header Access-Control-Allow-Headers Content-Type,access-token,language,Cookie;

add_header Access-Control-Allow-Method GET,POST,OPTIONS;

 root   /var/www/SFWEBSITE/API/public;       

           fastcgi_pass   127.0.0.1:9001;

           fastcgi_index  index.php;

           fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;

           include        fastcgi_params;

         }


    location / {

if (!-f $request_filename){

                rewrite ^(.*)$ /index.php?$1 last;

                break;

            }

        }

error_log  /usr/local/nginx/logs/error_svsapi_svsmarkets_com_log;

access_log  /usr/local/nginx/logs/access_svsapi_svsmarkets_com_log;

}