Hosts file clarification wanted please

I am in the process of trying to setup a DigitalOcean Droplet running Linux Ubuntu 14.04,Apache2 Php, MySql…

I have managed to create in “/etc/Apache2/sites-available/test.com.conf” and similar for example.com (and also a my real sites which are in the process of being propagated).

I read somewhere that the following Linux Mint command can be used to access the Droplets

sudo nano /etc/hosts

# **localhost** works OK in my browser and call show the relevant Droplet Virtual Host
127.0.0.1 localhost

# both these work OK in my browser
123.45.67.89  test.com
123.45.67.89  example.com

**My question:** If I supply the actual DNS Record name to someone else can they access my Droplet?

edit:
I hope I have used the correct names, etc, if not please highlight the mistakes.

Yes provided that it is a public address available to anyone. There are a few ranges that are defined as private to the local network so if you provide one of those it will only work if they are on your local network.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.