Zen Cart Logo
Forums / Installing on a Windows Server / set up standalone "example.com" domain in Windows XP - editing hosts file

set up standalone "example.com" domain in Windows XP - editing hosts file

Locked

Views: 6,762

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
16 Aug 2008, 11:39 PM
#1
lieven23 avatar

lieven23

Zen Follower

Join Date:
Aug 2008
Posts:
340
Plugin Contributions:
0

set up standalone "example.com" domain in Windows XP - editing hosts file

Hi

In "e-Start Your Web Store with Zen Cart" I read how you can set up a domain in windows XP
But Idon't understand very well what they mean in step 1 and 2

To set up a domain in Windows XP:

  1. Edit the file C: \WINDOWS\system32\dr ivers\etc\hosts with a text editor. Change the drive letter (C:)
    to match your own computer setup.
  2. Add the following lines to the end of the file.

127.0.0.1 https://www.example.com # For browser access
127.0.0.1 mail.example.com # For email access
127.0.0.1 example.com # For mercury mail server
(should I completely copy this block?)
3. Remember to save the contents of the file.

When I look for the file C: \WINDOWS\system32\dr ivers\etc\hosts , it says this
Nowhere can I find a reference to a drive as it is mentioned in step1.
Can anyone help me with this?

Copyright (c) 1993-1999 Microsoft Corp.

Dit is een voorbeeld HOSTS-bestand dat wordt gebruikt door Microsoft TCP/IP for Windows.

Dit bestand bevat de toewijzingen van IP-adressen naar hostnamen. Elke vermelding

moet op een afzonderlijke regel staan. Het IP-adres dient in de eerste kolom te worden

geplaatst, gevolgd door de bijbehorende hostnaam. Het IP-adres en de hostnaam dienen

gescheiden te zijn door ten minste één spatie.

Daarnaast kunnen opmerkingen (zoals deze) worden toegevoegd op extra

regels of gevolgd door de computernaam, voorafgegaan door een #.

Bijvoorbeeld:

102.54.94.97 rhino.acme.com # bronserver

38.25.63.10 x.acme.com # x clienthost

127.0.0.1 localhost

30 Dec 2008, 6:27 AM
#2
manaylor avatar

manaylor

New Zenner

Join Date:
Dec 2008
Posts:
1
Plugin Contributions:
0

Re: set up standalone "example.com" domain in Windows XP - editing hosts file

Hello. I am having similar problems in getting my head around these instructions.

"To set up a domain in Windows XP:

  1. Edit the file C: \WINDOWS\system32\dr ivers\etc\hosts with a text editor. Change the drive letter (C:)
    to match your own computer setup.
  2. Add the following lines to the end of the file.

127.0.0.1 https://www.example.com # For browser access
127.0.0.1 mail.example.com # For email access
127.0.0.1 example.com # For mercury mail server

  1. Remember to save the contents of the file.
    You should now be able to use “localhost” and “www.example.com” interchangeably when accessing your web
    server via a web browser. The “mail.example.com” domain will make more sense to you when you learn how to
    configure Zen Cart to send emails in “Mail Server Settings” on page 72. The “example.com” domain will be used in
    “Configuring Mercury” on page 38.
    Configuring Apache"

The person who left a reply in Dutch does not help the problem. Please let me know if you have managed to resolve this problem. Can any body shed light on this? Thanks, Martin

30 Dec 2008, 7:56 AM
#3
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: set up standalone "example.com" domain in Windows XP - editing hosts file

Hi Martin, the instructions are rather verbose to cater to the myriad setups on different computers.

If you are running Windows XP, just edit the hosts file for your windows system and append the said lines to the file using Windows Notepad should also work.

The following thread may also be helpful if you are not able to get things to work after performing the steps.

http://www.zen-cart.com/forum/showthread.php?t=108851

14 Jan 2009, 9:51 AM
#4
iddy avatar

iddy

Zen Follower

Join Date:
Jan 2009
Posts:
119
Plugin Contributions:
0

Re: set up standalone "example.com" domain in Windows XP - editing hosts file

Hi All,

I'm having the same problem with my setup and I've tried deleting all lines from the file, cut and pasted the info from the manual and resaved it, and I've finished the rest of the setup per the manual. The hosts file is not saved as a text file.

I've tried a system reboot a number of times but nothing seems to work.

Is there a work around that i can use.( operating system is xp home edition SP3 and IE7)

Thanks
John

15 Jan 2009, 7:50 AM
#5
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: set up standalone "example.com" domain in Windows XP - editing hosts file

The hosts file mentioned in the manual should *not *have a file extension. On some systems, a file extension might be appended to it automatically and hidden from the end user thus causing problems.

Try checking whether this could be the cause of your problem by enabling the display of file extensions on your system. Instructions on how to do that are available here.

15 Jan 2009, 9:35 AM
#6
iddy avatar

iddy

Zen Follower

Join Date:
Jan 2009
Posts:
119
Plugin Contributions:
0

Re: set up standalone "example.com" domain in Windows XP - editing hosts file

The file doesn't have an extension. I've disconnected the laptop so it cannot access the internet but when i type in https://www.example.com the dial up box appears. Any ideas?

one other question i have is (assuming i can get things working correctly) should i continue to use https://www.example.com as i am working through the manual or should i use my own domain ( https://www.mmw.ie ) to make it easier to transfer the practice shop to the live shop. (Obviously I'm a newbie at this and would like to make this as simple as possible for myself)

Thanks for your help
John

16 Jan 2009, 5:49 AM
#7
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: set up standalone "example.com" domain in Windows XP - editing hosts file

To stop the dial up box from appearing, open up your Internet Explorer browser. Click on Tools > Internet Options and select the Connections tab. Click the "Never dial a connection" radio button.

It's better to use example.com for testing and not configure your own domain for your hosts file. One of the reasons is it makes it very obvious which is a test site and which is a live site so you reduce chances of updates being erroneously pushed to the wrong site.

16 Jan 2009, 7:16 AM
#8
iddy avatar

iddy

Zen Follower

Join Date:
Jan 2009
Posts:
119
Plugin Contributions:
0

Re: set up standalone "example.com" domain in Windows XP - editing hosts file

Its working correctly now!

Thanks for your help

John