npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

apache-node-proxy

v1.0.2

Published

CLI tool to automatically configure Apache virtual hosts for Node.js applications

Readme

Apache Node.js Proxy

A powerful CLI tool to automatically configure Apache virtual hosts for Node.js applications on Bitnami installations.

🚀 Features

  • Interactive Setup: Guided configuration with user-friendly prompts
  • Predefined Virtual Hosts: Automatically enable Bitnami's predefined configurations
  • Custom Virtual Hosts: Create custom HTTP and HTTPS virtual host configurations
  • Automatic Apache Restart: Seamlessly restart Apache after configuration
  • Validation: Comprehensive validation of paths, permissions, and configurations
  • HTTPS Support: Optional HTTPS virtual host configuration with SSL certificates

📦 Installation

Using npx (Recommended)

npx apache-node-proxy

Global Installation

npm install -g apache-node-proxy
apache-node-proxy

🛠️ Usage

Interactive Mode

Run the tool and follow the interactive prompts:

sudo npx apache-node-proxy

The tool will ask for:

  • Project Path: Path to your Node.js application
  • Port: Port your application runs on (default: 3000)
  • Application Name: Name for configuration files (default: myapp)
  • Use Predefined: Whether to use Bitnami's predefined virtual hosts
  • HTTPS: Whether to configure HTTPS virtual host

Quick Setup (Coming Soon)

sudo npx apache-node-proxy quick --path /path/to/app --port 3000 --name myapp

📋 Prerequisites

  • Bitnami Apache Installation: This tool is designed for Bitnami Apache installations
  • Root Privileges: Must be run with sudo for Apache configuration
  • Node.js Application: Your application should be running on the specified port
  • Linux Environment: Designed for Linux servers with Bitnami stack

🔧 What It Does

1. Predefined Virtual Hosts (Default)

If you choose to use predefined virtual hosts, the tool will:

  • Copy sample-vhost.conf.disabled to sample-vhost.conf
  • Copy sample-https-vhost.conf.disabled to sample-https-vhost.conf
  • These files are pre-configured for port 3000

2. Custom Virtual Hosts

If you choose custom configuration, the tool will create:

HTTP Virtual Host (/opt/bitnami/apache/conf/vhosts/{appName}-http-vhost.conf):

<VirtualHost _default_:80>
  ServerAlias *
  DocumentRoot "/path/to/your/app/public"
  <Directory "/path/to/your/app/public">
    Require all granted
  </Directory>
  ProxyPass / http://localhost:3000/
  ProxyPassReverse / http://localhost:3000/
</VirtualHost>

HTTPS Virtual Host (/opt/bitnami/apache/conf/vhosts/{appName}-https-vhost.conf):

<VirtualHost _default_:443>
  ServerAlias *
  SSLEngine on
  SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt"
  SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"
  DocumentRoot "/path/to/your/app"
  <Directory "/path/to/your/app">
    Require all granted
  </Directory>
  ProxyPass / http://localhost:3000/
  ProxyPassReverse / http://localhost:3000/
</VirtualHost>

3. Apache Restart

Automatically restarts Apache using:

sudo /opt/bitnami/ctlscript.sh restart apache

🎯 Example Workflow

  1. Start your Node.js application:

    cd /path/to/your/app
    npm start
  2. Run the proxy tool:

    sudo npx apache-node-proxy
  3. Follow the prompts:

    • Enter project path: /path/to/your/app
    • Enter port: 3000
    • Enter app name: myapp
    • Use predefined: Yes
    • Configure HTTPS: Yes
  4. Access your application:

    • HTTP: http://your-domain.com
    • HTTPS: https://your-domain.com

🔍 Troubleshooting

Common Issues

  1. Permission Denied

    • Ensure you're running with sudo
    • Check file permissions on Apache directories
  2. Bitnami Not Found

    • Verify Bitnami is installed at /opt/bitnami
    • This tool is designed specifically for Bitnami installations
  3. Apache Restart Failed

    • Check Apache error logs: /opt/bitnami/apache/logs/error_log
    • Verify virtual host syntax
    • Restart manually: sudo /opt/bitnami/ctlscript.sh restart apache
  4. Application Not Accessible

    • Ensure your Node.js application is running on the specified port
    • Check firewall settings
    • Verify domain DNS configuration

Manual Configuration

If the tool fails, you can manually configure virtual hosts:

  1. Enable predefined virtual hosts:

    sudo cp /opt/bitnami/apache/conf/vhosts/sample-vhost.conf.disabled /opt/bitnami/apache/conf/vhosts/sample-vhost.conf
    sudo cp /opt/bitnami/apache/conf/vhosts/sample-https-vhost.conf.disabled /opt/bitnami/apache/conf/vhosts/sample-https-vhost.conf
  2. Restart Apache:

    sudo /opt/bitnami/ctlscript.sh restart apache

📝 Configuration Files

The tool creates configuration files in:

  • /opt/bitnami/apache/conf/vhosts/

Generated files:

  • {appName}-http-vhost.conf (HTTP virtual host)
  • {appName}-https-vhost.conf (HTTPS virtual host)

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details

🆘 Support

If you encounter issues:

  1. Check the troubleshooting section
  2. Review Apache error logs
  3. Open an issue on GitHub with detailed information

Note: This tool is specifically designed for Bitnami Apache installations on Linux servers. For other Apache configurations, manual setup may be required.