How to Host Multiple Node Apps with nginx and pm2

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 31

  • @RickMeijer
    @RickMeijer Год назад +2

    Thank you. No fluff, clear instructions. Got it running on the first try.

    • @codewithbubb
      @codewithbubb  Год назад

      Cheers! Glad you got it working. I hate fluff 🤣

  • @jupo.
    @jupo. 5 месяцев назад +1

    Quick, concise, and clear! Thank you heaps

    • @codewithbubb
      @codewithbubb  5 месяцев назад

      Thanks very much. Hope it helped you out.

  • @Bayzon08
    @Bayzon08 7 дней назад

    Exactly what I needed thanks!

  • @lifegivesuslemons421
    @lifegivesuslemons421 29 дней назад

    your the man. thank you for this wonderful video.

  • @AlfredoCelso
    @AlfredoCelso 8 месяцев назад +1

    Very clear explanation, thanks a lot.

    • @codewithbubb
      @codewithbubb  8 месяцев назад

      You’re welcome. Hope it helps you out.

  • @zoki5388
    @zoki5388 Год назад +1

    Hey James,
    Thanks a lot for creating this video.

    • @codewithbubb
      @codewithbubb  Год назад

      You’re welcome! Hope it answered your question (let me know if not!).

  • @davidemmanuel3001
    @davidemmanuel3001 Год назад +1

    This is a great topic. All apps seem to run on port 80

    • @codewithbubb
      @codewithbubb  Год назад

      Yeah, if you wanted to make use of SSL if you have it setup you would want to move those ‘location’ blocks into the nginx conf section that manages that 👍

  • @zakyzamroni
    @zakyzamroni 4 месяца назад

    THANKYOUU SO MUCHHH!!🤩🤩🤩🤩🤩🤩

  • @krzemir1
    @krzemir1 Год назад

    Thanks, this is clean and simple

  • @janstergaard703
    @janstergaard703 6 месяцев назад +1

    On the page with text descriptions..
    Change to this:
    sudo systemctl reload nginx
    Since this sudo "sudo systemctl nginx reload" give an error.

    • @janstergaard703
      @janstergaard703 6 месяцев назад +1

      Thank a lot for your video!

    • @codewithbubb
      @codewithbubb  5 месяцев назад

      Thanks so much for this - i'll update it!

  • @netsaosa4973
    @netsaosa4973 Год назад +4

    wasn't working for me until I put the / at the end of my proxypass -_-

    • @blockchainandweb3120
      @blockchainandweb3120 Год назад

      Thanks bro. Do you know why is that ?

    • @netsaosa4973
      @netsaosa4973 Год назад

      @@blockchainandweb3120no idea

    • @marcuschong1660
      @marcuschong1660 Год назад

      Thank you. So glad to see this comment. I've been spending hours to figure out the issue only to come across your solution that works

    • @ljlinen
      @ljlinen 6 месяцев назад

      thanks bro, this also worked for me, i wasted a lot of energy on just a slash '/' dang

  • @hoatranquang8376
    @hoatranquang8376 Год назад +1

    Dear Codebubb,
    The first thank big for you.
    I had problems.
    - after install nodejs, npm, pm2
    - when i action: pm2 list -->Spawning PM2 daemon with pm2_home=/home/vietk/.pm2
    and pm2 start app.js -->Spawning PM2 daemon with pm2_home=/home/vietk/.pm2 --> it can not show table as you was worked.
    I had tried many method( install Os Ubuntu 22.04 , install nodejs..., but it still have problems as above
    Can you and everybody help me!
    Thnak you so much.

    • @codewithbubb
      @codewithbubb  Год назад

      Hi, how did you install pm2? It could be it was installed with elevated privileges (root?) and then you're running it as another user? Try sudo pm2 list and see if you still get the error.

    • @hoatranquang8376
      @hoatranquang8376 Год назад +1

      @@codewithbubb
      Dear you,
      it still error -->Spawning PM2 daemon with pm2_home=/home/vietk/.pm2
      Thank you

    • @codewithbubb
      @codewithbubb  Год назад

      Did you try it as root? Are you able to run any other node stuff on your server? Try running with debug to see if there is any more info: DEBUG=* pm2 list
      Also, check your disk isn't full and also check the permissions/ownership of your pm2 module e.g. ls -alh /usr/local/lib/node_modules/pm2 (or wherever your global node_modules are).

    • @hoatranquang8376
      @hoatranquang8376 Год назад +1

      @@codewithbubb
      Thank you so much.
      I installed nodejs and pm2 by manual
      Result is ok

    • @codewithbubb
      @codewithbubb  Год назад +2

      @@hoatranquang8376 Ah great! Glad to hear you got it sorted.

  • @sriphagaaruchtsrinhichaarn5942

    Have a problem how get another folder file😕 Please advise.

    • @wingmanup7368
      @wingmanup7368 Год назад

      use the touch command. For example touch