Questions tagged [node.js]

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications. NOTE: Please read the Tag-Wiki before asking questions.

Filter by
Sorted by
Tagged with
132 votes
20 answers
148k views

How do you install Node.JS on CentOS?

I've found numerous installation instructions for Node.js but they all seem so complicated -- I'm not a super sys admin but I can get around. I have yum on the system, but I didn't find any node.js ...
qodeninja's user avatar
  • 2,763
8 votes
2 answers
20k views

Nodejs Nginx error: (13: Permission denied) while connecting to upstream

I'm trying to run multiple Nodejs applications on Nginx server running on CentOS 7. I noticed that when I run a Nodejs app on some ports I get an 502 Bad Gateway error in the browser so I checked the ...
user1's user avatar
  • 181
1 vote
1 answer
3k views

How do you run Nginx on port 8080 and Apache on port 80 on the same box?

I want to install Node.js on my box (CentOS 5) for testing and sandboxing but I can't uninstall Apache as recommend by developers using Nginx. So what I'd like to do is have Nginx serving nodejs....
qodeninja's user avatar
  • 2,763
22 votes
3 answers
98k views

Node.js is not accessible from external IPs on Ubuntu

I'm sure this is very noobish, so forgive me. I'm trying to run a node.js server on port 8080 of my ubuntu 10.04. Here's the result of iptables -L on the server: Chain INPUT (policy ACCEPT) target ...
Mikael Gramont's user avatar
17 votes
1 answer
46k views

Configuring Apache 2.4 mod_proxy_wstunnel for Socket.IO 1.0

I'm trying to configure Apache 2.4 for proxying the websocket connection for socket.io to a node.js websocket server, using mod_proxy_wstunnel. We had this working fine with socket.io 0.9, but with ...
Twipped's user avatar
  • 643
13 votes
1 answer
12k views

Different fields for proxy_set_header in nginx configuration

I am very new to nginx configuration. I want to use it set virtual hosts so that I can run different Node JS apps on different ports on the same server, but have them served at different subdomains. ...
user191017's user avatar
8 votes
3 answers
24k views

Dynamic port forwarding based on hostname or originating ip

I'm a programmer trying to figure out some stuff beyond my domain: Say I have one machine and clients will make tcp (but not http!) connections to it. I want to redirect clients to their own ports ...
user23398's user avatar
  • 1,211
1 vote
1 answer
357 views

I have a VPS running on a single IP, can I redirect domains to ports or do I need separate IPs?

The situation may be resolved by my intention to purchase an IPv6 prefix for the VPS, but in the mean time I'd quite like to know if this is possible. Basically what I want to achieve is a simple ...
Chris Browne's user avatar
20 votes
4 answers
38k views

How do I configure Nginx proxy_pass Node.js HTTP server via UNIX socket?

I am trying to configure a Nginx server to connect to a Node.js HTTP server via a UNIX domain socket. The Nginx configuration file: server { listen 80; location / { proxy_pass http://unix:/...
pvorb's user avatar
  • 1,060
19 votes
2 answers
63k views

nginx: connect() failed (111: Connection refused) while connecting to upstream

I keep seeing the below error message's in the error log, I can access all of the resources but I'm unsure as to why the error is flagging. error: [error] 13368#0: *449 connect() failed (111: ...
Tam2's user avatar
  • 293
11 votes
2 answers
12k views

docker-compose for nginx and nodejs server

I have the following docker-compose.yml file: version: '3' services: server: build: context: ../../ dockerfile: ./packages/website/Dockerfile command: node ...
dagda1's user avatar
  • 247
10 votes
3 answers
17k views

Appengine stuck on "Updating service [default]..."

I am using nodejs on appengine. We had a perfectly stable app scaffold on tuesday, and by friday it was completely broken after attempting to deploy. We made some minor changes to frontend code, but ...
posit labs's user avatar
5 votes
1 answer
11k views

Azure Web App (Linux): “Error: Container didn't respond to HTTP pings on port: 8080” - when using: “start”: “pm2 start server.js”

My App Service Linux instance crashes if my node app is using the start script: "start": "pm2 start server.js": 2019-04-15 11:36:34.432 ERROR - Container crime-digest__6ea5_0 for site crime-...
Edmond Tamas's user avatar
5 votes
1 answer
26k views

Using an Apache VirtualHost to access a Node JS instance on the same server

I am using VirtualHosts to allow access to various domains and subdomians of my site on the same Apache server. Along the lines of: <VirtualHost *:80> DocumentRoot /var/www/site ...
JJJollyjim's user avatar
4 votes
1 answer
9k views

High # of sockets in TIME-WAIT state, server unresponsive at load

Our app became unresponsive at high loads, with longer wait times. Process usage was abnormally low (~15% CPU utilisation per process, our app runs on 8 processes). Nginx error log output showed a ...
Julian H. Lam's user avatar
4 votes
2 answers
14k views

nginx leads to 504 error, but my app is still running

So, we're using Node.js to power CompassionPit.com, and it's all served up by nginx. nginx is throwing a 504 Gateway Time-out The interesting thing, however, is that if I navigate to http://...
Zack Burt's user avatar
  • 201
4 votes
3 answers
21k views

How to configure Systemd service unit to start Node app with "npm start" instead of "app.js"

Environment: CentOS 8, Node.js, Digital Ocean Droplet My Systemd setup starts a node app with the following command. It works as expected. $ sudo systemctl start myapp File 1: /etc/systemd/system/...
myNewAccount's user avatar
3 votes
1 answer
6k views

Proxy to "backend" service whenever a file does not exists

I'm using NGINX to serve static file. Whenever a file does not exist, I want NGINX to hit a nodejs backend service that will try to asynchronously retrieve that file. The backend service needs 3 ...
ZogStriP's user avatar
  • 164
2 votes
1 answer
4k views

how to properly set up ImageMagick on AWS server using nodejs and express

so basically I've been struggling for a while now on getting imagemagick and or graphicsmagick to run properly with my node app, so far I followed the installation source from http://www.imagemagick....
user1375895's user avatar
2 votes
2 answers
678 views

Gearman writing "Too many open files" into the log. Disk space issues

We're running a service that makes screenshots of URL supplied and posts it to our S3 bucket. Similar to manet, but our custom coded nodejs app. We don't store the screenshots on our local hard drive. ...
Alexey's user avatar
  • 49
2 votes
1 answer
425 views

Industrial standard for multiple node apps on a single VPS?

I have a VPS that runs several node apps behind a reverse proxy. Each app is run via pm2 by a different user (i.e. each user runs pm2 on it's own), app-specific environment variables are set within ...
monday's user avatar
  • 185
2 votes
1 answer
1k views

diagnosing mongodb major faulting and erratic behavior

We have a mongodb instance running on an amazon ec2 large (7.5GB) ubuntu instance (same machine that our node.js server is running from). Traffic has increased a LOT recently and we are starting to ...
Hersheezy's user avatar
  • 356
1 vote
1 answer
290 views

Problems with the sessions and HAProxy in OpenShift

I have written an application using Kraken and deploy in OpenShift with the option of auto-scaling (use HAProxy) but this has led me two problems: 1) HAProxy constantly sends requests to the ...
Rodrigo Moreno's user avatar
1 vote
1 answer
8k views

Using ProxyHTMLURLMap to redirect css and js requests

I already have apache 2.4.19 installed on my Ubuntu 16.04 working with Tomcat. I'm trying to add a node app and redirect all requests for /node to http://localhost:3000 with ProxyPass. My node app is ...
Gpack's user avatar
  • 123
1 vote
0 answers
488 views

Ghost With Nginx Only Works on Port 80

I've been struggling to get this fixed since yesterday. I've done a lot to try and resolve it and still nothing seams to work. I am trying to install NodeJS with Ghost and use NGINX as a reverse proxy ...
Dani's user avatar
  • 33
1 vote
1 answer
5k views

502 Connection refused while connecting to upstream : modify Nginx upstream on Google App Engine

I'm literally struggling with Google App Engine to deploy my Node JS API as I always have a 502 error. I have seen many answers on this topic but none did it for me. I've found in the log the ...
t3__rry's user avatar
  • 113
1 vote
1 answer
677 views

Node.js and Apache on the same server

What'd I'd like to do is have a node.js program be hosted in public_html/<appname> and be accessible by heading to domainname.com:80/appname - the server is Ubuntu 10.04, I'm using Apache as my ...
jrg's user avatar
  • 219
1 vote
1 answer
2k views

Node.js apps and wordpress on the same vps

So currently my linode (ubuntu 11.10) serves up three node.js apps for me using connect's vhost middleware listening on port 80. Here is an example of how vhost sets up a domain: var portfolio = ...
Msencenb's user avatar
  • 113
0 votes
1 answer
303 views

Forward or Reverse proxy?

I have a webapp running on CentOS 7 with Apache that uses the xmlhttprequest and fetch apis to access an Express Server (NodeJS) running on the same machine. My webapp is using port 80 for incoming ...
MateoIO's user avatar
  • 103