Is it possible to configure a VirtualHost for Apache with custom hosts settings without modifying /etc/hosts?
I want a VirtualHost to connect to a different host for testing then my live system. For example, in my /etc/hosts file I would have entries such as:
Where 10.0.0.10 is an IP for my test box and real_db is a link to the live system.
This is a setup I have to work with and changing the code to point to a different server would require touching couple of hundred files.
I am looking for a way to have Apache control which hosts are used depending on which VirtualHost I access.
My other alternative is to write a Bash script to comment/uncomment entries in /etc/hosts, though this approach relies on me remembering to actually do that. I would prefer to stick with something that does not require my input.