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

Possible Duplicate:
Hosting multiple distinct folders for distinct domains

I have two domains pointing to the same IP address.

They both go to the directory /public_html/www/.

What is the best way to make the home directory of one of the domains /public_html/www/somethingelse/?

share|improve this question

migrated from stackoverflow.com Oct 17 '12 at 1:56

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

marked as duplicate by Iain Oct 17 '12 at 20:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This is not a php question. –  vascowhite Oct 8 '12 at 15:53
umm vhosts –  Lawrence Cherone Oct 8 '12 at 15:55
not dns question either –  Peter Oct 8 '12 at 21:13

1 Answer 1

Add a new virtual host entry in your httpd.conf like this :

<VirtualHost *:80>
  DocumentRoot /public_html/www/somethingelse/
  ServerName www.yourdomain.com

  # Other directives here


Read this for more info : http://httpd.apache.org/docs/2.2/vhosts/examples.html

share|improve this answer