I have a VPS
which is running Windows server 2008 datacenter
with one Static IP address.
I can access from Internet to my web services by specific port e.g mydomain.com:3000/api
and mydomain.com:4000/api
. I want to change this web services access address into sub domain method (child) like App1WS.mydomain.com/api
and App2WS.mydomain.com/api
update
I add this line to host
file
127.0.0.1 mobileapp.myrealdomain.com
Then in nginx, I add these lines at the end
server {
listen 80;
#root html;
root c:/apps/web;
server_name mobileapp.myrealdomain.com;
location / {
proxy_pass "http://127.0.0.1:3000";
}
}
Then I started my loopback project which is accessible via:
C:\apps\mobileapp>node .
Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
Then I've add Alias(CNMAE) record to DNS:
alias name: mobileapp
FQDN: mobileapp.myrealdomain.com
FQDN for target host: 127.0.0.1:3000.
From other location on Internet myrealdomain.com
loads homepage but still mobileapp.myrealdomain.com
showing
server DNS address could not be found.
In VPS mobileapp.myrealdomain.com
works properly and loads server up time
{"started":"2017-09-23T10:29:30.626Z","uptime":48.709}
No comments:
Post a Comment