Wonder if you can point me in the correct direction with what I want to achieve.
I currently develop on a Mac using MAMP Pro as my local LAMP stack, then move to a subdomain on a live production server for testing, before final deployment to the live site. This generally works ok, but using virtual instances of Win XP / Win 7 and multiple browsers, the local MAMP server cant be accessed reliably.
I would like to take an old P3 based machine and duplicate the production server as closely as possible (Centos based) and use it as an internal development server.
I would like to address the development server ( and sites under development ) as domain1.dev , domain2.dev etc, or some variation of. This server will be for internal purposes only.
I think this is a dns issue, specifically a caching-only setup, can anyone shed a little light?
Yes, this is a DNS issue, you will need to set up a DNS server internally to allow you to do something like that.
Alternatively, if you only create sites every so often, an entry in the ‘hosts’ file would do the same job and probably be far easier to manage on a small scale.
On a WinDoze box, editing the local hosts file does the job very well. I’m sure that Mac also uses a hosts file but don’t know where it’s located. Yes, hosts is an extensionless filename.
Having done things that way for many years, we decided to get away from that model as the DNS management becomes a bit of a nightmare. We build most apps to handle development work in sub-uris (eg – localhost/project). If it needs to live in the root, for whatever reason, we use ports (eg – localhost:13001), not domains. Much, much less overhead from lots of angles.