Jump to content

Subdomains In XAMPP 1.6.2


tarun

Recommended Posts

In order to do that you will have to edit your host file (On Win XP it is in "C:\windows\system32\drivers\etc\hosts") and add the following line to it:

127.0.0.1	test.localhost

 

Then setup a Virtual Host within the httpd.conf file for each subdomain you setup within the hosts file.

 

Here is an example of what you have to do here. And here is the documentation for setting up virtual hosts.

 

NOTE: You must restart Windows when you make any changes to the hosts files. Also make a backup of you hosts file before making any changes - boot into safe mode to make a backup of this file.

Link to comment
Share on other sites

I Can't Save The hosts file once ive edited it

 

In Notepad It Says

Cannot create the C:\Windows\System32\drivera\etc\hosts file.

Make sure the path and file name are correct.

 

And In EditPlus I Get

This is a read-only document.

 

 

 

I Think It's Because There Is No File Extension In The "hosts" File What Should I Do Now...?

Link to comment
Share on other sites

When you go to save the file in notepad make sure the File Type box is set to All Files and not Text Document (*.txt). If you cannot save changes to the hosts file then there may be security software on your computer that is preventing you from saving to the hosts file. For example I have ZoneAlarm Firewall. It has the option called 'Lock host file' (under Firewall > Advanced). If that setting is enabled then I get similar errors as to you.

Link to comment
Share on other sites

Well I Used A Different Method It Was Due To Windows Vista UAC (User Account Control)

 

Then I Did As Told And Then Restarted My Computer

But I Got "Internet Explorer cannot display the webpage" When Viewing An http://localhost Page

 

So I Reverted Back To The Old Files

 

Now I Shall Wait A While And Read Up On What I Did Wrong And Learn A Bit More

Then I May Try Again...

 

Anyway

Thnx For Your Help... :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.