how to redirect child domains to specific localhost ports in windows server 2008 VPS?

Home Forums Server Operating Systems Windows Server 2008 / 2008 R2 how to redirect child domains to specific localhost ports in windows server 2008 VPS?

This topic contains 0 replies, has 1 voice, and was last updated by  RSA408 1 year, 2 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts

  • RSA408
    Member
    #167229

    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

    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 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:appsmobileapp>node . Web server listening at: [url]http://localhost:3000[/url] Browse your REST API at [url]http://localhost:3000/explorer[/url]
    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}

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.