Nginx Proxy Manager (NPM) icon

Nginx Proxy Manager (NPM)

Interact with your NPM instance

Overview

The node integrates with an Nginx Proxy Manager (NPM) instance to manage redirection hosts. Specifically, the Create operation for the Redirection Host resource allows users to define domain redirections on their NPM server. This is useful for scenarios where you want to redirect traffic from one or more domains to a different target domain, optionally controlling the HTTP status code and other advanced options.

Practical examples include:

  • Redirecting multiple old domain names to a new primary domain.
  • Enforcing HTTPS or HTTP schemes on redirected domains.
  • Setting up temporary or permanent redirects with specific HTTP codes.
  • Enabling security features like HSTS or blocking exploits on redirection hosts.

Properties

Name Meaning
Domain Names One or more domain names to be redirected. Each domain is specified as a string.
Forward Scheme The scheme to use when forwarding requests: HTTP, HTTPS, or Auto (automatically determine).
Forward Domain Name The target domain name to which the requests will be redirected.
Forward HTTP Code The HTTP status code used for redirection. Options include: 300 Multiple Choices, 301 Moved Permanently, 302 Found Permanently, 303 See Other, 307 Temporary Redirect, and 308 Permanent Redirect.
Options A collection of additional settings:
- Preserve Path (boolean): Whether to keep the original request path in the redirect.
- SSL Forced (boolean): Force SSL usage.
- HTTP2 Support (boolean): Enable HTTP/2.
- HSTS Enable (boolean): Enable HTTP Strict Transport Security.
- HSTS Subdomains (boolean): Apply HSTS to subdomains.
- Certificate ID (number): ID of the SSL certificate to use.
- Block Exploits (boolean): Enable exploit blocking.
- Advanced Config (string): Custom advanced configuration in raw text format.

Output

The node outputs JSON data representing the created redirection host object as returned by the Nginx Proxy Manager API. This typically includes details such as the assigned ID, configured domains, forwarding settings, and enabled options.

If the node supports binary data output, it would relate to certificates or logs, but for this operation, only JSON output is relevant.

Dependencies

  • Requires an active connection to an Nginx Proxy Manager instance.
  • Needs credentials including the URL, email, and password to authenticate and obtain an API token.
  • The node uses the NPM API token to perform operations securely.
  • No additional external services are required beyond the NPM API.

Troubleshooting

  • Login failed: No token received: Indicates authentication failure. Verify that the provided URL, email, and password credentials are correct and that the NPM instance is reachable.
  • Invalid domain names or missing required fields: Ensure that at least one domain is provided and all required properties (like forward domain name and HTTP code) are set.
  • API errors related to certificate ID: If specifying a certificate ID, confirm that the certificate exists in NPM and the ID is valid.
  • Network connectivity issues: Confirm that the n8n instance can reach the NPM server URL.
  • Permission errors: Make sure the user account used has sufficient permissions to create redirection hosts.

Links and References

Discussion