LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How do you name a server? (https://www.linuxquestions.org/questions/linux-server-73/how-do-you-name-a-server-474800/)

cucolin@ 08-17-2006 11:26 AM

How do you name a server?
 
Hello friends, here at work we set up a LAMP server for our Intranet. For now we can access it by typing the IP address, but we wanted to just type "intranet" or something else instead of the IP. I've looking to this answer in the apache website, but I'm a newbie in Apache so I have not figure it out yet. Thanks for your help..

pljvaldez 08-17-2006 11:48 AM

What you actually have to do is add a name and the corresponding IP address to a DNS server on your network. This will map the name to an IP. I don't know how big your company is, but our company automatically adds your machine hostname to the DNS server list when you register it on the network.

HappyTux 08-17-2006 11:50 AM

Quote:

Originally Posted by cucolin@
Hello friends, here at work we set up a LAMP server for our Intranet. For now we can access it by typing the IP address, but we wanted to just type "intranet" or something else instead of the IP. I've looking to this answer in the apache website, but I'm a newbie in Apache so I have not figure it out yet. Thanks for your help..

It should have nothing to do with apache rather what your machine is named as in the file /etc/hosts and /etc/hostname. For example if your machine has a line like this in your /etc/hosts.

Code:

127.0.0.1      localhost.localdomain  localhost intranet
And the /etc/hostname is the same (eg contains intranet for the name) then on the server itself http://intranet will access it. Now assuming that the other machines run linux and they have a line like this in the /etc/hosts.

Code:

192.168.0.100      intranet
Then they will know that the machine at IP address 192.168.0.100 is named intranet and when they send out the request for http://intranet they will contact the 192.168.0.100 address. Now where this/these file(s) location(s) is/are if using windows I have no clue.

kordump 08-17-2006 11:51 AM

You will also need to set the following in your httpd.conf:
Code:

ServerName intranet.mycompany.com
And of course you'll need to substitute mycompany.com with the appropriate domain name.

cucolin@ 08-17-2006 02:52 PM

Ok, HappyTux I followed your steps, but I got another page when I typed "intranet" in my browser I get from Novell(which is what this organization uses) saying:

STARGATE NetWare Management Portal

And is asking me for a login name.
Can I set this to any other name. I need to make this easy for the users here at work. We are about 25-30 users.

Thanks

HappyTux 08-17-2006 04:40 PM

Quote:

Originally Posted by cucolin@
Ok, HappyTux I followed your steps, but I got another page when I typed "intranet" in my browser I get from Novell(which is what this organization uses) saying:

STARGATE NetWare Management Portal

And is asking me for a login name.
Can I set this to any other name. I need to make this easy for the users here at work. We are about 25-30 users.

Thanks

By typing in "intranet" do you mean http://intranet/ to be telling the server you are looking for a webserver on that machine to serve you up the default home page? Also is the webserver on the Novel machine? On linux you can set the hostname to anything you want if you have control of the machine now if you are running Netware on the server then what I remember from the the servers I set up about 15 years ago with it is rather poor and outdated.

cucolin@ 08-18-2006 10:10 AM

Yes I have control over the server and it is not running Netware. Yes, we want our users just to type "intranet" or http://intranet and be able to view the default page. This webserver is NOT on the Novell machine. I was doing the steps you told me but I still DON'T get when I type "hostname" intranet and get the name I previously had.

Thanks

HappyTux 08-18-2006 11:47 AM

Quote:

Originally Posted by cucolin@
Yes I have control over the server and it is not running Netware. Yes, we want our users just to type "intranet" or http://intranet and be able to view the default page. This webserver is NOT on the Novell machine. I was doing the steps you told me but I still DON'T get when I type "hostname" intranet and get the name I previously had.

Thanks

Ok then it looks like somehow the novell machine/something in your configs is telling the machines that the novell machine is named intranet try using something like localnetwork or companynet for the name of the machine.


All times are GMT -5. The time now is 12:20 PM.