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
0 votes
1 answer
4k views

Nginx server blocks and socket.io - CORS

I have been running apps with this server blocks structure for sometime and it has never given me any problems. geo $authentication { default "Authentication required"; `Some ip number` &...
Álvaro's user avatar
  • 117
0 votes
0 answers
260 views

Why is my ubuntu service timing out when I can clearly see it started properly?

Here is my log : Feb 10 10:19:25 ip-172-31-47-29 systemd[1]: Starting TNR Photo Download Service... Feb 10 10:19:26 ip-172-31-47-29 tnr-photos[67938]: Server running on port 2200 Feb 10 10:20:56 ip-...
Chapo's user avatar
  • 71
0 votes
0 answers
366 views

Setting up Express.js api in production enviroment

I have an Ubuntu server, and I am trying to deploy an express.js/node based Rest API. All the documents I have read say use Nginx as a reverse proxy to get it working so I have attempted that a dozen ...
chris's user avatar
  • 167
2 votes
0 answers
585 views

What is the recommended way to deploy a node app on FreeBSD in 2021?

Basically I want to deploy a node application on FreeBSD 12. Ideally I'd prefer to build it on one system, and install it in production separately, so as to install as few development tools on the ...
pnadeau's user avatar
  • 143
0 votes
1 answer
2k views

Deploying nodejs app using npx http-server and Nginx

I am deploying a nodejs app I have tried two alternatives but I can't understand what's the better approach in terms of performance. The first approach I tried is to lunch using pm2 npm start (which ...
G M's user avatar
  • 103
1 vote
1 answer
494 views

WSS Connectivity issue on production

I am using Angular8 as frontend and Nodejs as backend I have Configured WSS on production ,but connection with client not working properly, In one page connection is working but in another page ...
Satish Umagol's user avatar
0 votes
0 answers
1k views

SSL Error: How to use Nginx with Node.js App using Angular and websocket

I am running into an SSL error when setting up Nginx as a reverse proxy for a Node.js app. This app uses Angular to serve dynamic content and for WebSocket, we use ws. WS working properly but when ...
user23316's user avatar
1 vote
0 answers
137 views

Cannot perform command as a different User - even from root user

I have pm2 node modules installed in a user called otheruser. I need to run the program from root user. If I normally logged to otheruser and perform any action its working fine. otheruser@bubble-...
The Keeper's user avatar
0 votes
2 answers
942 views

Program installed for one user cannot be accessed from other user even full path is provided

I have all the npm pacakages installed for a particular user (i.e) not root (/home/otheruser/*) I am using monit to see whether to check the program is running. In this case its pm2, which is in /home/...
The Keeper's user avatar
1 vote
1 answer
865 views

Nginx + Express app in subdirectory/location, returning 404

I want to make an express app accessible through http://website.com/app and use nginx as a reverse proxy as well as to serve static files. This is my nginx configuration: upstream app { server ...
Felix's user avatar
  • 11
1 vote
0 answers
2k views

Slow load nextjs (nodejs) app in apache server

Disclaimer : all the time metrics is measured via the developer tool Context I have a nextjs app hosted in a vps (ovh). The nextjs app run in port 3000 on my vps via pm2. When i deploy the app in ...
Hadock's user avatar
  • 123
2 votes
1 answer
905 views

Node.js server does not respond externally

I made a simple node.js server: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(9999, '0....
Igor Savinkin's user avatar
0 votes
0 answers
76 views

Why might SELinux issue a Permission Denied error when accessing an upstream Node.js server's default routes, but not static files like image files? [duplicate]

Environment: Nginx reverse proxy serving static resources and using proxy_pass to serve resources from 2 separate Node.js upstream server instances. Simplified example nginx.conf: server { ...
stackedAndOverflowed's user avatar
1 vote
2 answers
17k views

What would cause "Connection Refused" with simplest nginx centos setup on GCE?

Update I followed the same steps as below except on a generic VPS provided ( Not google ) and it worked as anticipated including unlisted steps such as enabling HTTPS with Certbot... So my presumption ...
Dapper's user avatar
  • 13
0 votes
1 answer
3k views

curl nginx as proxy server with "-i" works but with "-I" 404

i'm trying to make nginx as proxy_server to nodejs app on port 3000 for testing purpose with compression, when doing this: curl -I -H 'Accept-Encoding: gzip, deflate' http://localhost/json i go this: ...
Younes Keraressi's user avatar
0 votes
0 answers
69 views

Multiple Web Application - Cache Layer Design

I have multiple client e-commerce web applications running on a single VM, each web application is a node.js express application. The express web application communicates with the back end via API's ...
Tam2's user avatar
  • 111
0 votes
1 answer
247 views

How do i add nodejs runtime layer layer to my Python Lambda on AWS?

wscat test In my Python lambda I want to use wscat which requires node: $ /opt/wscat-layer/bin/wscat /usr/bin/env: node: No such file or directory Question: How do I add nodejs runtime to my Python ...
Alex B's user avatar
  • 123
0 votes
0 answers
819 views

Angular post request refused, but nodejs post request works

I have an express app which listening on port 5000 like this: app.listen(5000, "0.0.0.0, ()=>'Server started on' + 'port ' + 5000). When I try to send a post request by node script using axios ...
Daniel Davrayev's user avatar
4 votes
1 answer
2k views

AWS EC2 SSH connection disconnects after some times and then starts throwing connection timed out error on every SSH connection request

I've created an ec2 instance and a ssh-rsa keypair. I then try to connect with the instance using visual studio code remote-ssh extension. In the first try, it connects successfully. I can access ...
S. Joshi's user avatar
0 votes
1 answer
246 views

Unbearably slow redis connection when using openvpn

I have an OpenVPN config file like the following: client proto udp explicit-exit-notify remote SOME_REMOTE_SERVER 1194 dev tun resolv-retry infinite nobind persist-key persist-tun remote-cert-tls ...
Tri Nguyen's user avatar
1 vote
3 answers
1k views

NGINX frontend HTTPS server rejects requests to local backend http express server

I have an application that's split into two servers: one is a React application running on port 8080 and the other is an Express server running on 3001. The machine running this application has to run ...
Charlie Monnone's user avatar
0 votes
0 answers
211 views

How to Serve Nodejs Application from sub directory with PHP Application on root?

I have php running in root directory and wants to run a microservice built with nodejs in subdirectory. I did some configurations but the css/js/images are showing 404 not found. Below the nginx ...
gurupal singh's user avatar
0 votes
1 answer
504 views

Cannot setup a reverse proxy with Nginx

I'm trying to display my NodeJS application when the user type a specific domain. I already pointed the domain on the server, then I've installed Nginx and I have created a configuration file into: /...
sfarzoso's user avatar
  • 103
0 votes
0 answers
137 views

Are requests with no headers a sign of hacking?

I run a NodeJS web application with packages up to date and secured with a strong password and RSA for ssh. The application runs on two domains. I check the request headers to get the domain and found ...
miguelmorin's user avatar
0 votes
1 answer
1k views

Error in Node.js / Ubuntu 20 server configuration: 111 Connection refused

I get these three lines of errors when I refresh my page: 2020/10/07 16:38:55 [error] 315270#315270: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 66.249.66.221, ...
DJG's user avatar
  • 101
0 votes
0 answers
2k views

Client sends "FIN, ACK" instead of "Client Hello" | Connection closed during SSL handshake | Haproxy

I am trying to establish SSL connection between the .NET WebSocket Client and my server by calling "wss://domain.xyz". Haproxy is handling the SSL handshake and once that is done it connect ...
Panays's user avatar
  • 1
1 vote
1 answer
3k views

Exposing or listening to a http port on google cloud instance

I have a google cloud instance (Ubuntu 20.04) where I tried to run a nodejs app and expose it to port 80. Here my server.js code: var express = require('express'), app = express(), http = require('...
Syed Arefinul Haque's user avatar
2 votes
0 answers
211 views

How to reverse proxy a Nodejs instance on a directory of an AWS lightsail website

I have a website and Nodejs application hosted on the same AWS lightsail instance such that I want the website to connect to use the data hosted by the Nodejs application. The API is hosted on port ...
Philip09's user avatar
0 votes
1 answer
345 views

Can this inbound & outbound bandwidth of my server cause issues?

I have a social app where users do the usual stuff of other social apps; upload multiple text and photo posts every hour, like & comment (a notification is created for each action), view custom/...
Sotiris Kaniras's user avatar
0 votes
0 answers
394 views

EC2 Instance with node pm2 keeps breaking my instances ssh

Update:ok weird so my instance public dns seemed to change? is that possible, now I can ssh in after changing to the new one. still can't ssh in from the browserbased connection tho. I have a ec2 t2....
Anders Kitson's user avatar
1 vote
1 answer
294 views

How to assign which user to execute commands inside the container in AWS FARGATE

i'm trying to launch a nodejs container using AWS FARGATE, the problem i'm facing is that fargate gives me this error : cannot find this module "/path/to/file/webrtc.js" And when i execute ...
logax's user avatar
  • 129
0 votes
0 answers
2k views

502 Bad Gateway when uploading files (NGINX and NodeJS)

I am developing an app where the user can upload files. While the backend call seems to work fine, the call when uploading files returns a 502 Bad Gateway message. The files actually get uploaded but ...
lnband's user avatar
  • 1
0 votes
0 answers
75 views

OSS Server Written in Javascript, Linux Based Needs MIME Configuration

Scenario: There is a popular OSS application named Potree, hosted in GitHub. I am getting minimum support from its author, a very talented but busy guy who does not know much Linux or Apache. This is ...
David Alarcon's user avatar
0 votes
1 answer
722 views

Correct Way to Install Node.js in a Multiuser Server? [duplicate]

I have to acknowledge being an old timer U*ix system administrator. Software to be used by everybody had two possible locations: /usr/bin /usr/local/bin The best example is gcc and family. Now I find ...
David Alarcon's user avatar
0 votes
1 answer
99 views

What Prevents a Server Owned by a Non-Priviledged User to be Reached by Apache?

There is a popular Open Source application written in Javascript Node.js that listens to port localhost:1234 under my regular, non privileged account. When connecting from localhost everything works ...
David Alarcon's user avatar
0 votes
0 answers
91 views

Should I compile Node.js from source on an Amazon Lightsail smallest instance?

I'm using the cheapest Amazon Lightsail instance to set up an Nginx + Node.js server. I have compiled Nginx successfully already, however it's taking too long to compile Node.js. Is this is even a ...
gregn3's user avatar
  • 101
0 votes
1 answer
2k views

nginx does not set x-forwarded-for header

I want to get the IP adress of the client that visits my page. My app is running behind a proxy so i set this configuration to my nginx file: proxy_set_header X-Forwarded-For $remote_addr; Now i try ...
Ilijanovic's user avatar
1 vote
1 answer
3k views

NodeJS and Redis Cluster - Error: connect EMFILE

I'm banging my head against the wall now for 3 days and counting. I hope you can tell me what am I doing wrong. I have a Redis cluster with 3 masters and 3 slaves. A NodeJS application wishes to use ...
Bert's user avatar
  • 1,048
1 vote
1 answer
766 views

AWS EFS - file delete and recreate not detected programmatically for 25 to 30 seconds

I am observing a very large delay in EFS detecting that a file has been re-created i.e. deleted and then created again. In this simple test example, I have a single file that gets deleted and ...
Ben's user avatar
  • 121
3 votes
3 answers
1k views

How to set Amazon Route53 for multiple distinct domains on the same IP address?

I have two different domain names with completely different websites. This is how my nginx configuration looks like: server { listen 80; server_name domainnameone.com; location / { ...
Dong's user avatar
  • 135
0 votes
1 answer
563 views

Google App Engine Fetch Slow Speeds

I'm running a NodeJS Google App Engine service that retrieves a large file and sends it to a Virtual Private Server hosted on Digital Ocean or AWS. The file is about 5MB and takes up to a minute to ...
Josh's user avatar
  • 109
0 votes
1 answer
357 views

Is it possible to forward a port for one app only?

I have a Ubuntu server (18.04) which hosts some websites on Apache2, and also has a node app running. I want the node app to use SSL, but as it's not running as root it doesn't have permission to ...
DisgruntledGoat's user avatar
2 votes
1 answer
2k views

App Engine Flexible Deployment Issue: 403 Resource Error

we have been trying to deploy our nodejs code to app engine flexible but unable to as it shows a Resource Error. We have GSuite Organization account and are using it for deployments. This is the error:...
Shaurya Chauhan's user avatar
1 vote
1 answer
349 views

Flush DNS cache in Google App Engine

We recently had a Google App Engine application fail to properly fail over during scheduled maintenance of our database server (hosted in Aiven). During scheduled maintenance, the DB server will fail ...
ChrisJ's user avatar
  • 295
0 votes
1 answer
111 views

How to serve / from a static file, but the rest of the root directory from a proxy (NodeJS)?

I've tried the following: # this *should* serve the root from a static index.html file location = / { try_files $uri $uri.html $uri/ /index.html; } # resources are served ...
fadedbee's user avatar
  • 2,068
0 votes
1 answer
340 views

What's so good about having a job queue?

I am currently building an API that sends transactional emails to users. I do this with a job queue, bull in particular. During development, something crossed my mind; where are these jobs actually ...
Jonathan van de Groep's user avatar
1 vote
1 answer
476 views

How to prevent node js from serving .git folders and all the files under .git

I know that using .htaccess file can restrict files to be served under .git but how do i acheive the same if i'm using node.js server. I use forever to start/stop the servers.
Nilamber Singh's user avatar
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
-1 votes
1 answer
706 views

Cpanel NodeJS app displaying source code [closed]

I have set up nodeJS app on cpanel using cpanel nodeJS selector. Apps root directory is /home/userName/public_html/server. The app is working fine. Problem is if I send get request to example.com/...
Imtiaz Chowdhury's user avatar
0 votes
1 answer
3k views

Apache reverse proxy to nodejs server on CentOS 7 (WHM)

I'm trying to setup my site on the server. I've uploaded it and it's currently running on the server but the problem comes when I try to setup a reverse proxy on the domain so that I can access the ...
James's user avatar
  • 1

1 2 3
4
5
21