Page 1 of 1

Apache Server Name Change

PostPosted: 27. February 2009 17:00
by takuhii
Does anyone know if you can chnage a server name using APACHE/XAMPP?

If so could you tell me how. I am uising a windows server, but need to "rename" the machine my XAMPP install sits on, but without physically editing the machine name (SYSTEM > PROPERTIES).

Many thanks
Darren

Re: Apache Server Name Change

PostPosted: 27. February 2009 17:03
by Wiedmann
but need to "rename" the machine my XAMPP install sits on,

Why?

Maybe you are talking about the hostname in the URI?
--> Instead of "http://localhost/" you want use e.g. "http://example.com/"?

Re: Apache Server Name Change

PostPosted: 27. February 2009 17:35
by takuhii
Wiedmann wrote:
but need to "rename" the machine my XAMPP install sits on,

Why?

Maybe you are talking about the hostname in the URI?
--> Instead of "http://localhost/" you want use e.g. "http://example.com/"?


I think that's what I mean yes. Sorry, bit of a novice at this, unfortunately it has to be a chnage EVERYONE can see...

Re: Apache Server Name Change

PostPosted: 27. February 2009 17:38
by Wiedmann
it has to be a chnage EVERYONE can see...

So you need a domain (from an ISP) which point to your current IP. You can't do this yourself.

(e.g. from no-ip or DynDNS)

Re: Apache Server Name Change

PostPosted: 27. February 2009 17:47
by takuhii
Wiedmann wrote:
it has to be a chnage EVERYONE can see...

So you need a domain (from an ISP) which point to your current IP. You can't do this yourself.

(e.g. from no-ip or DynDNS)


Can't I set something virtual up, like http://myBlog/ it's for internal use only, so only people on my server can see it, it isn't a worldwide thing, it's part of an intranet...

Re: Apache Server Name Change

PostPosted: 27. February 2009 17:53
by Wiedmann
it's part of an intranet...

I guess you have one server pc, and inside your lan you want connect to this pc from other pc's with /your own/ hostname.

- Don't you have an dns server in your lan (intranet)?
- How many pc's?

Re: Apache Server Name Change

PostPosted: 27. February 2009 17:55
by takuhii
Wiedmann wrote:
it's part of an intranet...

I guess you have one server pc, and inside your lan you want connect to this pc from other pc's with /your own/ hostname.

- Don't you have an dns server in your lan (intranet)?
- How many pc's?


About 50 pcs don't think we have DNS, I don't think I'd be allowed access to it if I did...

Re: Apache Server Name Change

PostPosted: 27. February 2009 18:55
by Wiedmann
About 50 pcs

Well. you have to change the HOSTS file on all 50pcs ...

don't think we have DNS, I don't think I'd be allowed access to it if I did...

... if you can't make an entry on your/any dns server.

Re: Apache Server Name Change

PostPosted: 27. February 2009 20:34
by takuhii
Wiedmann wrote:
About 50 pcs

Well. you have to change the HOSTS file on all 50pcs ...

don't think we have DNS, I don't think I'd be allowed access to it if I did...

... if you can't make an entry on your/any dns server.

ok, no worries, I was wondering if there was a shortcut that didn't involve DNS, or physically changing the PC name

Re: Apache Server Name Change

PostPosted: 04. April 2009 13:47
by xxwickedxx
If you are using Windows go to:

C:\WINDOWS\system32\drivers\etc
which is the OS folder you are using.

you'll find a file called "hosts"

open it and add the host u want after localhost

#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
127.0.0.1 yourdomain.com

Note that this will only work on your Local Computer
if you want it to open on other computers you have to edit every host file on each computer but instead of the local IP address 127.0.0.1 you have to use the DHCP IP Address of your computer 192.168.x.x

:roll:

If you are using a Domain Controller in a Network then you can create a script and assign it to the group policy in the DC and when the users open his/her account then the script will edit the host file and add the ip automatically.