Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a situation where I need to serve multiple websites from the same IP address for testing purposes with Apache. I need to set the sites up as follows:

  67.54.34.2/site1    ->    site1_folder
  67.54.34.2/site2    ->    site2_folder
  67.54.34.2/site3    ->    site3_folder

In other words, I want to append a folder name (or append something) to the IP address and map this to a document root. How can I set something like this up in Apache? Also, is it possible to set it up to automatically map to certain folders so I don't have to add directives for each documentRoot?

share|improve this question

migrated from stackoverflow.com Nov 10 '10 at 6:42

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

You will need to use vhosts ( virtual hosts )

There are very simple how-tos on the internet..

READ THIS.... :D

http://www.serverwatch.com/tutorials/article.php/1127571/Apache-Guide-Setting-Up-Virtual-Hosts.htm

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.