Giter Site home page Giter Site logo

jlfdzdev / hestiacp-nodejs Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 10.0 25 KB

HestiaCP-NodeJS | This plugin allow install multiple nodejs apps using HestiaCP

License: GNU General Public License v3.0

Shell 29.07% PHP 63.01% Smarty 7.92%
hestiacp nginx nodejs php

hestiacp-nodejs's People

Contributors

jlfdzdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hestiacp-nodejs's Issues

Bug: Nginx Fails When Port Field is Empty, Default Port Not Set

Description

When the port field is left empty in the configuration, Nginx fails to start due to an invalid port in the upstream configuration. This issue occurs because the default port (3000) is not automatically set when the port field is empty. The error message received when running nginx -t is as follows:

nginx: [emerg] invalid port in upstream "127.0.0.1:" in /home/user/hestiacp_nodejs_config/web/domain.tld/nodejs-app.conf:2

This indicates that Nginx is unable to parse the configuration due to the missing port number after the IP address.

Steps to Reproduce

  1. Configure the Nginx upstream to use an IP address without specifying a port.
  2. Attempt to start Nginx with the configuration.
  3. Observe the error message indicating an invalid port in the upstream configuration.

Generated config files

# .conf
PORT=|START_SCRIPT=""|NODE_VERSION=v20.10.0
# nodejs-app-fallback.conf
location @fallback {
	proxy_pass http://127.0.0.1::/$1;
}
# nodejs-app.conf
location / {
	proxy_pass http://127.0.0.1:;
   	proxy_http_version 1.1;
 	proxy_set_header Upgrade $http_upgrade;
 	proxy_set_header Connection 'upgrade';
 	proxy_set_header Host $host;
	proxy_cache_bypass $http_upgrade;
}

Expected Behavior

It should automatically use the default port (3000) when the port field is empty in the configuration. This would allow Nginx to start successfully without requiring a port to be explicitly specified.

Environment

  • HestiaCP version: 1.8.11
  • Nginx version: 1.25.5
  • Operating System: ubuntu 22.04
  • Configuration File: /home/user/hestiacp_nodejs_config/web/domain.tld/nodejs-app.conf

how to start pm2?

Hello, i followed the steps and and im stuck at the latest point.
im not sure if the app is running, pm2 list returns no apps running, but the ecosystem.config file is created.

should i start pm2 manually?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.