For Apache, with mod_rewrite, we are providing the required rewrite rules which are already available in our .htaccess file through which the APIs of ImprintNext work. But for Nginx, you need to add the rules manually otherwise ImprintNext APIs will not work.


So, you need to edit the Nginx configuration. We will use the try_files directive (available from Nginx 0.7.27+) to pass URLs to its index.php for them to be internally handled.


Example:


If ImprintNext is installed with a designer folder at the root of the domain (something like http://www.abc.com/designer/) then you need to add an extra location /designer/api/v1/ block to your configuration file :

location /designer/api/v1/

 {

  try_files $uri $uri/ /designer/api/v1/index.php?$args;

}


After the changes are done in the configuration file, reload the Nginx configuration by executing the below command:

nginx -s reload


These are the steps you need to follow for the NGINX server for ImprintNext API to work.