Ubuntu: How to change Ubuntu server domain name?



Question:

I'm using Ubuntu server in my local network. I access the hosted sites on it from other computers using the local ip address. for example: 192.168.100.2/info.php/. I want to set a domain name to use it in the local network so i can access the sites like this: domain.dev/info.php/.


Solution:1

if you are doing this in organization where you want to access this url anywhere in private network then configure DNS.

if you just doing in local system and want to access from a specific hosts then you can do this by /etc/hosts file

open /etc/hosts file using

sudo gedit /etc/hosts  

then do entries like

192.168.100.2  domain.dev  hostname   

also mention ip and FQDN on all system's /etc/hosts where you want to access . so , all system know each other.


Solution:2

I simply had to do the DNS configuration on my router and then I was able to access the domain from all devices on the network.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »