Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 sites in separate folders. Both sites need to be in the web root so I frequently need to change the document root in my MAMP settings. Im assuming the answer is no, but is there a way i can make both sites act as if they are in the web root? Are there any other general practice solutions to my issue? Thanks

share|improve this question
up vote 1 down vote accepted

Apache Virtual Hosts

Add to httpd.conf something similar:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/site1

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/site2
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.