Questions tagged [express-vhost]
26 questions
4
votes
1 answer
vhost ip filter express node
I'm using vhost with express to manage two subdomain. All work well but I would like to filter the request for one of the subdomain by ip. Do you know if it's possible to do ?
I've tried to manage it in the app.js of my subdomain site but the…

jean-max
- 1,640
- 1
- 18
- 33
3
votes
1 answer
Subdomains not working using express-vhost
new to Stack Overflow.
So I'm hosting my website using Express (Node 9) on a Digital Ocean droplet. I'm using express-vhost so I can detect subdomains to allow me to do api.example.com instead of example.com/api but when I try it, it just directs me…

sys
- 31
- 1
3
votes
2 answers
Express vhosts + https
Is there any way I can run vhosts on Express with https? My current code (non-SSL) looks like this:
var express = require('express');
var vhost = require('vhost');
var path = require('path');
var appOne = express();
var appTwo = express();
var…

Flora Rosenkreuz
- 31
- 1
- 3
2
votes
1 answer
express vhost dynamic subdomains
I'm trying to create dynamic subdomains with an authentication check. The subdomains work as expected, but since i added the authentication it just gets ignored, at least most of the time.
isAuthenticated always returns false, so in theory it should…

carnifex_v3
- 31
- 3
2
votes
1 answer
How to run multiple nuxt instances using expressjs vhost feature
I am trying to run 2 or more nuxt apps using expressjs and its vhost feature. My aim is to run multiple nuxt apps assigned to different domains in one single port.
Here is what I tried.
I set up 2 nuxt sample apps
I set up expressjs with vhost…

defiant
- 3,161
- 11
- 41
- 65
2
votes
2 answers
Express Vhost 'argument handle is required'
Firstly, found a couple of similar question on here but no duplicates, I think my situation is slightly different.
Trying to get a website and associated API working on Express using vhost for subdomians.
Here is my folder structure
/api
…

jonhobbs
- 26,684
- 35
- 115
- 170
2
votes
1 answer
NodeJS Express - Two NodeJS instances on same port (vhost)
I'm trying to run 2 instances of NodeJS on the same port and server from diffrent server.js files (diffrent dir, config etc). My server provider gave me an information that vhost is running for a diffrent domain, and there is the question. How to…

Patryk Panek
- 405
- 4
- 20
2
votes
1 answer
node express vhosts VS multiple node applications on NGINX server
Is is possible to have an answer "to have and idea" with this info? :
In terms of performance ( basically speed )
QUESTION 1
1: what would be best to set on a nginx server :
Considering domains:
http://example1.com
https://example2.com…

MikZuit
- 684
- 5
- 17
2
votes
1 answer
ExpressJS multi domain https hosting
I've got a project, where I need to host two websites with two Domains, which point to the same server (1 static IP) with an EpressJS server.
During my research I found that, express can be expanded with vhosts. But I could not figure out, how to…

Nicolai Schmid
- 1,022
- 1
- 14
- 29
2
votes
1 answer
How to restart / update node express vhost site
Im working on couple of sites, both have 2 versions, live one and dev one.
http://timeprize.com and http://test.timeprize.com
They both run on the same port and server, using express vhost.
My vhost app looks very simple, and is basically this:
var…

Rainer Plumer
- 3,693
- 2
- 24
- 42
2
votes
1 answer
nodejs socketio multiple domains( separate io )
I have created 2 websites, that use socketio+nodejs( + 2 dev sites for them ).
Now, i need to move the 2 sites into one server.
To do that, i used express-vhost, and it works for everything...except for socket.io.
In my apps, i have used hundreds of…

Rainer Plumer
- 3,693
- 2
- 24
- 42
1
vote
0 answers
How do I change the root folder that a node module will look for?
I have a nodejs app. Inside this app, I have a secondapp and I use vhost to use one or other. The problem is: my second app uses a node module that needs a config file (file.json). This module look for this file in the root folder. However, the…

Rodrigo Francisquini
- 73
- 6
1
vote
1 answer
Subdomain setup for Heroku
I setup a Heroku app with vhost for subdomain handling. The app stopped responding to the custom domain originally assigned to it but the main Heroku app is live and working however, the subdomain link does not work for heroku. Please how can I fix…

Chukwuemeka
- 136
- 1
- 6
1
vote
0 answers
Vhost + express why doesn't work?
I try to configure my node.js + express application for creation multiple domain server. This is my code, but unfortunately it's not working. Please explain me, what is wrong in this code?
const express = require('express');
const bodyParser =…

Andrew Olinevich
- 61
- 1
- 1
- 8
1
vote
1 answer
Node.js Remove the port from the URL
I have two Node.js apps in my server. They are listing to port 55555. Here is the directory structure.
/home/myuser
/.htaccess
/package.json
/server.js
/foo.com
/node_modules
/public
/index.html
/package.json
…

Bishan
- 15,211
- 52
- 164
- 258