Multiple hostname for the same interface
Hi all,
I have a VM with apache on it serving three different sub-domains, for example:
When the VM starts, it gets its IP from the DHCP which should update the nameserver (both are on another VM in the same internal network) Is there a way for me to register all three hostnames (user, moderator, admin) through DHCP so that anyone in the example.com domain can access any of the addresses, even if the VMs IP had changed? I tried looking in the following directions, but couldn't find the answer
Some of my VMs are Ubuntu, some are Fedora Thanks karnaf |
a web server has no business running on DHCP. That's just horrible.
What I would suggest is seeing a difference between a hostname and a web domain it serves. A machine should be called by, and therefore registered to DHCP as, the name of the BOX, not of it's websites. the ONLY A record for that box should be the machine hostname. any subsequent sites that it hosts should then be defined statically in DNS as CNAME records pointing to that A record. |
Quote:
|
oh sure, a reservation is very different. There is no anticipation of anything changing, just being centrally controlled in that sort of situation. You should always now what IP is serving your website though.
|
Quote:
1. if you meant httpd & dhcp are on the same VM, well, they aren't 2. if you meant that a machine running httpd should have a static address and not get it dynamically, then I agree. However, that's a dev VM machine in a crazy world :-) Quote:
let's assume the machine's "real" hostname is my-funky-dev-server my-funky-dev-server.example.com will get an IP from DHCP (the A record), which in turn will update the NS in the NS, I'll set CNAME for all three sub-domains of my web app to point to my-funky-dev-server.example.com by name, and not by IP Correct? Thanks! k |
Some people use host headers to send the page to the correct server.
|
Quote:
|
All times are GMT -5. The time now is 05:54 PM. |