Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joostvanveen/b274ccb8ff9c52421f2d0542f551dbcd to your computer and use it in GitHub Desktop.
Save joostvanveen/b274ccb8ff9c52421f2d0542f551dbcd to your computer and use it in GitHub Desktop.
Enable Magento 1.* API on Byte Hypernode - nginx rewrite configuration. Typically, you would place this in server.rewrites or public.rewrites. See https://support.hypernode.com/knowledgebase/rewriting-and-redirecting-urls-in-nginx/
# Enable Magento 1.* API on Byte Hypernode
# Rewrite is piped through phpfpm, or the api.php is not run through PHP interpreter.
location /api {
rewrite ^/api/rest /api.php?type=rest last;
location ~ \.php$ {
echo_exec @phpfpm;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment