Report this

What is the reason for this report?

Do I need a domain name for internal webservices?

Posted on December 12, 2019

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?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.
0

Accepted 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.

Regards, KDSys

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.