Adding (sub)domains


(Fido D.) #1

Hi …

I have set up a BitCore server, with a full node, the insight and the insight-api modules.
All is working fine and the blockchain is almost in sync.

I now want to move to the next level and attach the insight-ui and the insight-api to my domain and create easy access.
Making the api accessible via api.mydomain.com was a peace of cake …
I am behind a firewall and us an NginX server to reverse proxy api.mydomain.com:80 to [internal-ip]:3001/insight-api

Now I want to do the same for the Insight UI, but when I redirect insight.mydomain.com:80 to [internal-ip]:3001/insight it fails to find the api and websocket.io modules.
Can anyone push me in the right direction?

It’s working on https://insight.bitpay.com/ and I want something simillar …

Thanx in advance …


(Braydon Fuller) #2

There are a few configuration options to change the paths of the API:


(Fido D.) #3

Hi Braydon,

Thank you for your response.

Unfortunatelly this only does routing to a subfolder with an other name, how about routing to an other subdomain?
I do not have any knowledge of Node.JS, sorry


(Braydon Fuller) #4

The apiPrefix could include a full URL include a subdomain, however I haven’t verified this. If not it may be possible to add another configuration option to specify the apiHost, perhaps.