Do I need a domain name for internal webservices?

Posted December 12, 2019 654 views

Sorry for the noob question, but I have two projects, a node webapp, and a set of webservices that sit behind the webapp. Only the webapp needs to see the webservices, they do not need to be viewable to the public.

Now, obviously this works fine when I develop locally. For the webservice connection from the webapp, I just specify localhost and the portnumber for the webservices.

However, I’m struggling to do this on my droplet. I have my sites-available set up for the domain of my webapp, and it is working fine. I’m just wondering if I need a further sites-available server block for my webservices considering I have no domain name for them. Do I need one?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Hi @MikeyC,

You shouldn’t need a domain for your internal webservices. You should just be able to access them using your IP and the relevant port.

For instance, let’s say you have a service listening on port 4564 and does have some interface. You should be able to reach it by doing something like

telnet XXX.XXX.XXX.XXX 4564

where XXX.XXX.XXX.XXX is your IP address. I’m not entirely sure what your application is about so I can’t give a more to the point answer however, there shouldn’t be any differences than using it locally except the IP address.


Submit an Answer