LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   basic questions on hostname and domain name + related postfix questions (http://www.linuxquestions.org/questions/linux-newbie-8/basic-questions-on-hostname-and-domain-name-related-postfix-questions-252343/)

Moebius 11-08-2004 05:20 AM

basic questions on hostname and domain name + related postfix questions
 
ok I'm just not understanding hostnames and domains properly. I just bought a web server that I'm sharing with my friend to host our client's websites on. Which means I'm not using just one domain. I'm not sure what I should set it to. Furthermore, I'm not sure what I should set the hostname to. Does it really matter? Right now the hostname is just "debian" Should I change it to the IP of the server?

Also, what should I set in things like the postfix server for mydomain and myhostname? I don't want to be stuck with one domain. For instence my domain is zacwittedesign.com and my friend's domain is culture graphic.com so he doesn't want his clients incoming mail server to be mail.zacwittedesign.com and visa versa. Is there a way I can have mail.clientdomain.com? On http://www.postfix.org/postconf.5.html#myhostname it says my hostname should be my fully qualified domain name. Since I don't want to specify a paricular domain name, can I just put the IP of the server?

But I'm not just worried about postfix, it goes for most other things as well. I guess I'm not too sure on what the exact deffinition of "hostname" and domainname" is... I need help figuring out what to put for /etc/hostname, /etc/hosts, /etc/dnsdomainname and in the config files for various servers.

Thanks for helping me through this.

amfoster 11-08-2004 01:28 PM

Are you talking about the machine that is the web server? If so, you can certainly set the hostname to www.whatever.com

Probably the most important factor is what you have propogated in dns. a dns record can point to for instance
192.168.0.1 as www and you can use cnames.

Also, you can bind as many IP addresses to a singe NIC as you want.

Here is a for instance...

ifconfig eth0 192.168.0.1
ifconfig eth0:0 10.10.10.1
ifconfig eth0:1 65.25.100.1

etc etc etc.

Now in your web server, you are merely going to create virtual hosts. They can be done on a name basis, or using ip based. If you do ip based, then those "virtual IP adresses" above will come into play.

Note: those virtual addresses made at the command line are only good until you reboot. If you want them retained via the boot process, then you need to make entries in the /etc/network/interfaces file

(I am assuming that box is debian based)

If it is redhat, then the file would be /etc/sysconfig/network-scripts/ifcfg-eth0:0 eth0:1 etc

So before any help can come that way, are you first off dealing with hostnames for the web server? Are you using apache web server using ip based or named based virtual hosts?

farslayer 08-27-2007 08:07 AM

The hostname on your mail server MUST match the Name registered in DNS for the MX record, or your server will get blacklisted.. so yeah it's sorta important.

Heres a quick guide on setting your servers hostname properly. http://www.cpqlinux.com/hostname.html



-

bskrakes 08-27-2007 11:36 AM

Hi there!

Are you hosting only one web site or do you plan on hosting many? Looks like you are going to host both your site and your friends site plus a clients.

Are you using any sort of Web Hosting Control Panel? Where did you purchase this hosting package from?

From my knowledge and experience I name my server whatever I want. I am hosting virtual sites so each site has its own settings. For example site getalifespammers.com would have the following setup for DNS records:
A record - IP address of your server 68.100.123.123
CNAME - getalifespammers.com
Pointer - getalifespammers.com
Mail MX Record(s) - mail.getalifespammers.com (this can be different depending on your clients HOME/BUSINESS isp - some isp's block port 25 so they wont be able to use your mail server (SMTP incoming/outing)

Once I know a little more about the server package you purchased and what was included I can help.

Cheers!

Moebius 09-03-2007 04:22 PM

Hey. The original message is a few years old. I've changed hosts since then and its now much more managed and working correctly. Thanks for the help.

bskrakes 09-03-2007 11:08 PM

No prob, if you need anything just PM me.

Cheers!

farslayer 09-04-2007 11:54 AM

weird.. how did I end up replying to a message that was 3 years old.. I didn't search for it.. **scratches head** Oh well

bskrakes 09-04-2007 12:50 PM

it showed up in the list as one of the newer threads... even though it wasn't new.... weird!


All times are GMT -5. The time now is 08:54 PM.