Setting .local domain names

ykgoh

Master Member
Joined
Jan 1, 2000
Messages
2,782
Reaction score
0
I see some developers setting .local domain names for their development machines, probably within an internal LAN. E.g. webserver.local, appserver.local.

How do they usually do this? By editing their /etc/hosts file?
Or they set up their own internal DNS server?
Or they use mDNS?
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,300
I see some developers setting .local domain names for their development machines, probably within an internal LAN. E.g. webserver.local, appserver.local.

How do they usually do this? By editing their /etc/hosts file?
Or they set up their own internal DNS server?
Or they use mDNS?

Modify your local hosts file will suffix for a lot of use cases, unless you have an application that goes to the DNS server directly which in some rare cases do exclude the local host file.

You can also cause consider a locally setup DNS masquerade server which serve as a DNS forwarder and also the option to overwrite domains. It doesn't have to be .local domain. It can be any domain. in one of the project, I use a .overwrite domain to create local DNS round robin for postfix system.
 

peterchan75

Supremacy Member
Joined
Apr 26, 2003
Messages
6,718
Reaction score
529
Sorry for hijacking your thread.

If using Apache http server, can the local domain names be defined there ?
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,300
Sorry for hijacking your thread.

If using Apache http server, can the local domain names be defined there ?

local host files are only consulted when any services in the host are trying to resolve domain names to ip addresses. Are you asking the question knowing this has nothing to do with your clients accessing your http server ?
 

peterchan75

Supremacy Member
Joined
Apr 26, 2003
Messages
6,718
Reaction score
529
local host files are only consulted when any services in the host are trying to resolve domain names to ip addresses. Are you asking the question knowing this has nothing to do with your clients accessing your http server ?
@david,
Sorry. Honestly, I have no idea what am I talking about. Just vaguely remember that it possible to name domain in http.conf setup file.:o
 

ykgoh

Master Member
Joined
Jan 1, 2000
Messages
2,782
Reaction score
0
@david,
Sorry. Honestly, I have no idea what am I talking about. Just vaguely remember that it possible to name domain in http.conf setup file.:o

I suspect what you're thinking of is virtual hosting. One physical Apache host with 1 IP address serving multiple websites with different domain names.
 
Last edited:

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,300
OK. Got it. Thanks.

Is that what you are asking? Virtual Hosting? There are 2 different virtual hosting. One by separate IP addresses. This one is simple The other is known as name-based virtual hosting. Different domains are hosted using the same IP address. the http server uses the HOST http header inserted by the browser to identify which virtual host to be served. Without the HOST header found, the default virtual host will be served.

Virtual hosting does not require DNS resolution to function
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top