Skip to content

Instantly share code, notes, and snippets.

@mklooss
Last active August 2, 2019 12:05
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mklooss/7300787 to your computer and use it in GitHub Desktop.
Save mklooss/7300787 to your computer and use it in GitHub Desktop.
nginx magento configuration for API Calls
location /api {
rewrite ^/api/rest /api.php?type=rest last;
rewrite ^/api/v2_soap /api.php?type=v2_soap last;
rewrite ^/api/soap /api.php?type=soap last;
}
@geoffjukes
Copy link

In one:

  location /api {
    rewrite ^/api/(\w+).*$ /api.php?type=$1 last;
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment