Page 1 of 1

How to set up a domain name instead of localhost

PostPosted: 27. January 2007 16:47
by jzint67
I have set up a php database on a computer at work. At the moment I am using http://"ip address"/hwcs/login.php to access the site. What I would like to do is set the computer up so that I can access it with a domain name(ie "www.hwcs.com"). The computer is currently running Win 2000 Pro. I am on a company intranet and have no desire to access this outside of the company. Is it possible to do this without registering with an outside service. I am very new to servers and would greatly appreciate some detailed help in this matter.

PostPosted: 27. January 2007 17:13
by Wiedmann
so that I can access it with a domain name(ie "www.hwcs.com").

Then you need a DNS record (domain name) for your computer.

Is it possible to do this without registering with an outside service.

If your company have it's own dns server for the intranet: yes. Ask your network admin.

Otherwise you can use the normal hostname of your computer for the access.

PostPosted: 27. January 2007 17:32
by jzint67
This really does not help me. How about http://hwcs. And if this will work, how do you set up the httpd.conf or the httpd.vhost to do this?

PostPosted: 27. January 2007 17:51
by Wiedmann
How about http://hwcs

"hwcs" is the hostname (computername) of your pc?

PostPosted: 27. January 2007 18:24
by jzint67
So basically, all I have to do is change the computer name which at this point is CRO-SBURK1 to HWCS or whatever I deem it to be then all I would have to do is type \\hwcs and it would take me directly to my web page?

PostPosted: 27. January 2007 18:37
by Wiedmann
A computer must be able to ping your computername. to access your webserver.

the computer name which at this point is CRO-SBURK1

IMHO at the moment a "ping cro-sburk1" will work from another computer. (in a correct configured LAN)

type \\hwcs and it would take me directly to my web page?

So, each computer can access your webserver with:
http://cro-sburk1/

all I have to do is change the computer name to HWCS or whatever

Yes... maybe. This depends on your specific network configuration (does all computers notice the change of the computer name...).

PostPosted: 02. February 2007 23:19
by Marctwo
If it's only for internal access you can set up as many sites as you like and call them whatever you like. eg:
Code: Select all
# apache vhost conf
<VirtualHost *:80>
    ServerName you_luv_jelly.yes.ok
    etc...
</VirtualHost>

Now all you have to do is make sure that every pc on the network has an entry for each domain in the hosts file:
'C:/windows/system32/drivers/etc/hosts'
You may find this file elsewhere on win2k.

Each internal domain should have an entry something like:
Code: Select all
# server ip        domain name
10.0.0.10          you_luv_jelly.yes.ok

Any pc with this entry in the hosts file will now resolve the domain name to your server.