For web development on my local server (nginx) I like to create subdomain vhosts for some projects, mostly for convenience and flexibility. For example
server {
listen 80;
server_name project.myHostname;
root /that/projects/html/root;
....
}
While technically questionable(?) it works fine when making a request to http://project.myHostname on that same machine. But I would like to end up with a configuration where I could access http://project.myHostname from any device connected in the local network (and only there). Just like it works when I access myHostname (Because, I guess my routers DNS resolves that to the local ip). But for the other thing I get all kinds of errors screaming there is no such thing as subdomain.hostname.
The only solution I have found so far is to manually edit the hosts file for every device that should be able to request that "address". Is there a more convenient solution?
I think a major issue here might be my poor grasping of the concepts and relations between hostname, domain name and such. I've been struggling with this for a while but have a hard time getting my head around it.