This is something I was wondering about for a long time. I'd say it's not uncommon (especially with the advent of VPS/VDS) to have one machine to perform as a web server, FTP server and mail gateway for a single website. However, most manuals or other documents imply that you have separate physical machine for each of those tasks.
My question is, how do you name stuff in a single-server environment?
There is a hostname variable in /etc/rc.conf. It is used as a default in many places. Plus, there are host names (or IPs) you use in Apache configs. Plus, there are DNS records. Plus, there is mail server configuration. How do you deal with all of these?
Let's assume we have example.org domain registered.
1. Would you use http://www.example.org as you hostname in rc.conf, or would you make a name separate from common aliases, e.g. bsd1.example.org?
2. Apache virtual hosts have one host name and several aliases. Usually I use http://www.example.org as a host, and example.org as an alias. Are there any problems with reversing those?
3. Would you make a DNS record for mail.example.org pointing to the same machine?
4. What are advantages and disadvantages of using DNS wildcards instead of naming every single host explicitly?
There are few iron-clad rules in naming, and many setups will work, but I suspect some of them will work better than others. So it would be interesting to hear about your naming schemes.
My question is, how do you name stuff in a single-server environment?
There is a hostname variable in /etc/rc.conf. It is used as a default in many places. Plus, there are host names (or IPs) you use in Apache configs. Plus, there are DNS records. Plus, there is mail server configuration. How do you deal with all of these?
Let's assume we have example.org domain registered.
1. Would you use http://www.example.org as you hostname in rc.conf, or would you make a name separate from common aliases, e.g. bsd1.example.org?
2. Apache virtual hosts have one host name and several aliases. Usually I use http://www.example.org as a host, and example.org as an alias. Are there any problems with reversing those?
3. Would you make a DNS record for mail.example.org pointing to the same machine?
4. What are advantages and disadvantages of using DNS wildcards instead of naming every single host explicitly?
There are few iron-clad rules in naming, and many setups will work, but I suspect some of them will work better than others. So it would be interesting to hear about your naming schemes.