How to set up a domain name instead of localhost

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to set up a domain name instead of localhost

Postby jzint67 » 27. January 2007 16:47

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.
jzint67
 
Posts: 3
Joined: 27. January 2007 16:18

Postby Wiedmann » 27. January 2007 17:13

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.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby jzint67 » 27. January 2007 17:32

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?
jzint67
 
Posts: 3
Joined: 27. January 2007 16:18

Postby Wiedmann » 27. January 2007 17:51

How about http://hwcs

"hwcs" is the hostname (computername) of your pc?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby jzint67 » 27. January 2007 18:24

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?
jzint67
 
Posts: 3
Joined: 27. January 2007 16:18

Postby Wiedmann » 27. January 2007 18:37

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...).
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Marctwo » 02. February 2007 23:19

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.
Marctwo
 
Posts: 5
Joined: 02. February 2007 20:56


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests