Solved

Virtual domains

Posted on 2002-04-24
6
190 Views
Last Modified: 2010-08-05
I have 1 server and 1 ip address and two completely different websites I would like to host from this server. Each site will have its own domain name. Is there a way i could redirect the browser to the proper website based on the domain name the browser is trying to access? If so, what would be the best way of doing this?

Thanks
0
Comment
Question by:liebrand
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:andreif
Comment Utility
Of course it's possible. The best way is configure your web server for using virtual hosts. Which werver do you use? Apache?
0
 
LVL 5

Expert Comment

by:harwantgrewal
Comment Utility
Ya it is possbile to use the Name based Virtual hosts

like this

http://httpd.apache.org/docs-2.0/vhosts/name-based.html

this is the best example if there is problem ask me

Harry
0
 
LVL 15

Author Comment

by:liebrand
Comment Utility
Its a Windows 2000 server running IIS5.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Accepted Solution

by:
harwantgrewal earned 100 total points
Comment Utility
In IIS you can add also

Goto internet information services in the administratative tools

right click on the computer name then new add a web site in the host headder add the name like www.test.com and complete all the information so yuo will have the site with www.test.com configure the DNS or hosts file to reflect the name you will see and new website

Harry


0
 
LVL 15

Author Comment

by:liebrand
Comment Utility
Harry,

Your solutions sounds good. But I created a new website and added the host header like you mentioned. I then went into my hosts file and put this

127.0.0.1  www.domainname.com

When trying to access the page locally, i get a "HTTP 403.1 Forbidden: Execute Access Forbidden
Internet Information Services

You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed."

What next?
0
 
LVL 15

Author Comment

by:liebrand
Comment Utility
I figured out the problem was simply permissions, but your solution got me to where I want to go. I have tested it internally and it works. I am going to be putting it out on the net, so hopefully I will have the same success.

Thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now