0

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

1 Answer 1

1

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>

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/site2
</VirtualHost>
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .