LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Domain name / hostname confusion (https://www.linuxquestions.org/questions/linux-networking-3/domain-name-hostname-confusion-498610/)

bhm8hwcm 11-04-2006 01:04 PM

Domain name / hostname confusion
 
I need some clarification on what my hostname and domain names should be.

I basically have on server which will run mail, web, ftp etc.
I have a static IP address for my box.
I will be hosting 2 different websites and the company I registered the domain names with have the domain names pointed at my server. I am using named based virtual hosting in apache and it works fine.
My lan consists of my one linux box and a few windows machines. My windows lan uses a "worgrounp" and not a "domain".

With regards to my linux box I do not know how to set it up.

Should the hostname be left at localhost.localdomain or should I change it to something else? If I give it a new new name, is it something like 'serverBox' or should it be 'serverBox.website1.com' ? Also what would be my entry in /etc/hosts, and do I leave the regular localhost entry in the file? If I leave it in, does my new entry go before or after the localhost entry?

If I am hosting www-website1-com and www-website2-com (I used hyphens only for posting purposes) is my FQDN to include one of these website names or is localhost best?

I need to figure these out so I can get my sendmail working.

Thanks

osor 11-04-2006 04:07 PM

In case you don't already know, if you are hosting www.website1.com and www.website2.com, you need to purchase two second-level domain names from a registrar who sells .com names.

You should make the linux box know your domain name. You should change its primary or virtual hostname to something meaninful (such as www for HTTP, mail or smtp for SMTP, imap for IMAP, etc.). For example, if your domain name is domain.com, and your virtual hostname is www, then its FQDN is www.domain.com.

JimBass 11-04-2006 08:25 PM

The actual computer's hostname and what the DNS points to (www-website1-com and www-website2-com) have nothing to do with one another. One of the production servers I use at work is named absolute.crap.org as its hostname, but none of the sites/services it runs are named absolute, and we don't own or use crap.org.

As long as the site is correctly working, you can call it anything you want locally, they have no impact on each other.

Peace,
JimBass

osor 11-04-2006 10:58 PM

Quote:

Originally Posted by JimBass
The actual computer's hostname and what the DNS points to (www-website1-com and www-website2-com) have nothing to do with one another. One of the production servers I use at work is named absolute.crap.org as its hostname, but none of the sites/services it runs are named absolute, and we don't own or use crap.org.

You don't have to use it for your real hostname, you use virtual hostnames.

bhm8hwcm 11-05-2006 01:20 AM

Hi Osor I do not quite understand your last comment. Can you please clarify what 'it' refers to. Also I am unclear about the real hostname and virtual hostnames. Sorry for my ignorance. When you say virtual hostnames are you referring to the sites virtually hosted through apache?

cougyr 11-05-2006 12:26 PM

I'm having similar trouble. Mine should be simpler, but it isn't, at least not to me. All I'm trying to do is to connect a Windows 95 computer to my Debian machine; the purpose is to share a printer. I have Samba running, but it cannot see the Windows machine and the Windows machine can't see the Linux unit. I have named the workgroup "WORKGROUP" but when I expand Network Neighborhood, it tries to find "localdomaine". ??? Where did that come from?

I get the impression that Microsoft and Linux use names differently. Is that true?

Can a two machine network operate as a workgroup without one of them designated as a server?

JimBass 11-05-2006 12:37 PM

Cougyr, your question has nothing to do with the original poster's question. He is asking about websites/hostnames, and you are asking about Samba shares.

You should start a new thread, as they have nothing to do with one another.

If you were to lookup a samba guide, you would see that as long as your windows box and linux box have the same workgroup name, they should see each other. Your linux box will appear with the computer name = its hostname, and as long as the linux box also has samba common/samba mount, it can see the windows shares. If that doesn't happen, you have something wrong in your samba configs.

peace,
Jimbass

cougyr 11-05-2006 02:04 PM

Quote:

Originally Posted by JimBass
Cougyr, your question has nothing to do with the original poster's question. He is asking about websites/hostnames, and you are asking about Samba shares.

I re-read the first question and don't see the difference, which I'm sure is part of the problem. I have been reading about Samba instructions and trouble shooting and it all points to naming problems, at least to me. I've used SWAT to configure "default", as much as possible. I can ping IPs from either side, but not names. How does one get Windows 95 to actually use the names?

Maybe I should be on a Windows forum, but since I use Linux, I prefer to be here. (My wife uses Windows 95 and likes it.)

JimBass 11-05-2006 03:04 PM

Well, your problem being with Samba and his with Apache/Sendmail is the beginning. He was asking about naming his computer locally, if it had any impact on the internet names people use to connect to his computer. He is connecting his computer to others across the internet (WAN), and you are asking about connecting two local computers on the LAN.

Windows 95 probably has its networking behave like Windows 98, but maybe not. The fact that they can ping suggests that the only problem is in your samba server configuration on the linux box, but again, this should be in its own thread, as anyone searching this thread in the future will have it taking a major turn at this point.

Peace,
JimBass

cougyr 11-05-2006 03:13 PM

OK, thanks


All times are GMT -5. The time now is 05:33 PM.