http-simple-proxy is a Node.js-based reverse proxy daemon designed to allow multiple web applications to share the same HTTP(S) ports (e.g., 80 and 443). It functions as a front-end HTTP service, providing features such as reverse proxying, URL rewriting, HTTP redirects, SSL termination, serving static files, basic HTTP authentication, and WebSocket support. It is a simpler rewrite of the 'http-master' project, intended for less complex use cases where ease of setup is prioritized over the more robust features of its predecessor. The package is currently at version 1.0.5, indicating a stable but possibly not rapidly evolving codebase. It distinguishes itself by offering an all-in-one configuration for listening ports and flexible routing based on domain names, paths, and regular expressions, enabling HTTPS for non-SSL compatible backends.
npm install http-simple-proxyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install http-simple-proxy and configure it to listen on ports 80 and 443, routing incoming requests to different backend services based on the domain name, including basic SSL configuration.
Do not attempt to port `http-master` configurations directly. Refer to the http-simple-proxy README for specific syntax and supported features.
Always validate your configuration object structure against the documentation examples. Start with simple rules and progressively add complexity. Use an object literal for the main configuration, and ensure `ports` is a top-level key within it.
Ensure `ssl.key` and `ssl.cert` point to existing, readable SSL private key and certificate files (e.g., using `fs.readFileSync` or providing paths for an internal mechanism). Test SSL configuration thoroughly.
Carefully review your wildcard domain rules. If you intend to catch both the root domain and its subdomains, use the `*?.domain.com` pattern. Test with various host headers to ensure correct routing.
Stop the conflicting process, or configure http-simple-proxy to listen on a different, available port.
Generate a new, valid SSL private key (e.g., 2048-bit or higher) and ensure it matches the certificate. Verify the paths to the key and certificate files are correct.
Double-check your configuration object structure. Ensure that `ports` is an object, and each port number within it contains an object that defines a `router` key.
Review your router configuration rules carefully. Ensure domain names match exactly (or use correct wildcards), target ports are correct, and the order of rules for complex routing is as intended (most specific rules should often come before more general ones).
No dependency data recorded yet.